Evilness object oriented approach in Morph

Andreas Raab andreas.raab at gmx.de
Sun Jan 22 19:52:09 UTC 2006

Hilaire Fernandes wrote:
> I have realized that many of the Morph method does not use instance
> variable accessor but direct access to the instance variable.
> One may think this improve the efficiency of the method but in the other
> hand its downgrade (or just break) the oriented object efficiency of
> thus objets.

I hear this argument over and over again, but I tend to disagree about 
its "evilness". After all, OO is all about *encapsulation* therefore you 
shouldn't really care about whether a class accesses its *own* iVars via 
messages or directly. It is only when subclassing comes into play that 
this causes problems, and perhaps, just perhaps, subclassing is at the 
root of that evilness? After all it's the subclasses that try to 
"extend" (some might say "violate") the well-defined behavior of its 

Just something to consider.

   - Andreas

More information about the Squeak-dev mailing list