[squeak-dev] Class with nil environment?!

tim Rowledge tim at rowledge.org
Thu Jul 11 19:58:55 UTC 2013

On 11-07-2013, at 11:25 AM, Frank Shearar <frank.shearar at gmail.com> wrote:
> But ANYWAY, there is a proposed solution that needs careful eyes and
> brains to look at and ponder over: make Class >> #declare: send the
> #environment message instead of accessing the instvar directly.

There are lots of good reasons for rarely referring to instance variables directly and this is one good example. Personally I'm not keen on using the same name for the message if at all possible; I really hate to see code that reads like a bad C program 
"foo list first top left" 
etc. Ought to be more like
"foo firstBlockTopLeft"
with obvious methods in appropriate classes. Yes, this makes for many more methods in the image. That's what images are for.

tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
An elephant is a mouse with an operating system.

More information about the Squeak-dev mailing list