[squeak-dev] Instance variable access in superclasses.

Michael van der Gulik mikevdg at gmail.com
Tue Nov 25 09:08:28 UTC 2008


Hi all.

What would people's reaction be if a class was prevented from being able to
directly access its superclass's instance variables? A subclass should use
accessor methods to access a superclass's instance variables.

Is there any particular reason subclasses get access to superclass instance
variables? I think it breaks encapsulation.

If this was implemented, it might be possible to avoid needing to recompile
every subclass when you modify the instance variables of a class.

Gulik.

-- 
http://people.squeakfoundation.org/person/mikevdg
http://gulik.pbwiki.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20081125/ba561310/attachment.htm


More information about the Squeak-dev mailing list