Write a new method, make sure to reference self first. Write a new method, make sure to reference self first. Call the method, make sure to reference self first.
You don’t reference self when calling a method, what on earth are you talking about?
You start with the instance when calling the method, like most/all other OOP languages.
Also there are benefits with the explicit self/this to access instance properties.
In C++ you need to make sure all class properties/members have a naming scheme that does not conflict with potential parameter names or other names of other variables.
Write a new method, make sure to reference self first. Write a new method, make sure to reference self first. Call the method, make sure to reference self first.
Yeah, I can see it.
You don’t reference self when calling a method, what on earth are you talking about? You start with the instance when calling the method, like most/all other OOP languages.
Also there are benefits with the explicit self/this to access instance properties. In C++ you need to make sure all class properties/members have a naming scheme that does not conflict with potential parameter names or other names of other variables.