Please use accessors!

Alan Lovejoy sourcery at pacbell.net
Mon Aug 2 09:23:40 UTC 1999


Note: this reply is just to you, not also to the Squeak list:

> ** Original Sender: "Carl Gundel" <morphic at hotmail.com>
> >Poorly designed code will be brittle.  But I am convinced that blaming
> >direct iVar access as the culprit is an oversimplification.
> 
> Okay, but I didn't say that direct ivar access was the sole culprit of 
> brittle code.  Writing code for myself, I sometimes don't use accessors, but 
> when working on a team I usually automatically generate them.
> 
> It isn't possible to pin down any "always right" programming practices.  In 
> my own experience, next year I won't completely agree with everything I 
> might say today.  ;-)
> 
> -Carl

Yup.  I disagree with my previous self all the time.  Since I see the same
characteristic in just about everybody, I can only conclude that we all would
benefit from toning down the vociferousness with which we propound our
dogma.  As my father was fond of saying: "The best way to handle a vicious
dogma is with a big stigma." :-).

My friend Ken Auer has always been suspicious of The Methodologists.
I've heard him accuse them more than once of having nice theories that
obviously were never tested against real life, practical problems.

Anyway, I hope to see you again at the Squeak BOF in Denver (OOPSLA '99).
We can discuss this at length over a cup of coffee...

--Alan





More information about the Squeak-dev mailing list