John:
> The programmer does not need to know the private variable. The class however
> does. Apart from wrapping things in a function, I don't see the difference..
There is a difference in ease of use.
If the private variable name is hardcoded in the class, then the programmer who wants to use the class has to know the name of the variable to use.
If the private variable name is not hardcoded in the class, the programmer must be aware that he has to create a private variable and pass the name to the class.
Using a wrapper around the class makes it easier to use because the private variable name is no longer an issue for the programmer who wants to use the class.
Daniel
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only