|
|
|
|
|
by kentosi
3535 days ago
|
|
"I really don't understand why people love properties", followed by "Getters and setters are elements of bad style". So you don't like either of the following: myObject.name = "Ben";
myObject.setName("Ben");
What alternative would you suggest then? |
|
The whole point of an object is that client code shouldn't be concerned with such details as maintaining the state of each internal field. Try and think of an object as a single thing you send high level messages to you, instead of a struct, or a bag, or a hashtable.