Evilness object oriented approach in Morph

Chris Muller afunkyobject at yahoo.com
Mon Jan 23 19:16:39 UTC 2006


There is nothing wrong with direct-variable access. 
When I first started Smalltalk I thought dogmatic
accessors for every single instance variable was a
good thing, now I have learned how much clutter and
violation of encapsulation it causes.  Of course, it
seems to be pretty much they do on most Java
projects..

For Morphic in particular, look how many methods we
have in the API and rendered in the browsers.  Less is
more.  Direct-variable access is an upgrade, not a
downgrade.

 - Chris

> Message: 15
> Date: Sun, 22 Jan 2006 12:21:33 +0100
> From: Hilaire Fernandes <hilaire at ext.cri74.org>
> Subject: Evilness object oriented approach in Morph
> To: Squeak Devel
> <squeak-dev at lists.squeakfoundation.org>
> Message-ID: <43D36ABD.80801 at ext.cri74.org>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> 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.
> Is refactoring the code of the Moprh methods
> something to be considered?
> 
> Hilaire




More information about the Squeak-dev mailing list