Outside the Rabbitt Hole and Into Wonderland..

Filed under Deck of Cards by Rabbitt on Some Day in May

Welcome. Please sit down and enjoy your stay, for it shan't be a short one and, it shan't be long that you wished it were a not so long one.

Remember - Follow the White Rabbitt

Private vs. Protected Members/Properties

Filed under Software, Development, Theory, OOP by Rabbitt on Friday March 24, 2006

So it’s been a while since I last posted anything and I just found this interesting page with an algorithm for choosing the correct scope for a class member/property - figured I’d share it for anyone interested:

Pretty much every object oriented programming language let’s you set the visibility of object members. Usually it defaults to public. That means everybody can access that member. Of course often you don’t want to [allow] other objects to access certain parts of your object. This is where private or protected come in to play.

— see: Michiel “El Muerte” Hendriks for more…

Popularity: 100%

16 queries. 0.082 seconds.
Powered by Wordpress
theme by evil.bert