trace(new Greeting ()); // Hello people!
I had just been told that storing lots of public properties in an object is not a very good OOP approach. Suggestions are to use mainly private properties if these ones are just accessed by the object itself, and then defining them using the constructor and/or other public functions.
I use to have some public properties and then change them when in need and use private properties just for private functions.
I don’t know if I’m “wrong” but for me the second approach is way comfortable than the first one.
What do you think?