[squeak-dev] The Trunk: Environments-cmm.38.mcz

Chris Muller asqueaker at gmail.com
Mon Dec 23 23:57:47 UTC 2013


> No there are already different ways to initialize.
> For example, take the collections, some of them #initialize: not #initialize
> in order to pass a size (or capacity) to the initializer.
> So the pattern used by Colin is pretty common in Squeak.
> I invoked the case of Point more for the fact it sends basicNew instead of
> new, than for the names.

The only reason Point sends basicNew instead of new is for
performance.  Morphic applications create millions of Point instances
and so an exception is made to avoid the extra send, nothing more.

> There are indeed two different things on the table
> 1) to have a single initializer
> 2) the names chosen for initialization
>
> Chris, the name count, you can't rename initialize -> set and declare this
> is not a setter, it's quite surrealist and make me think of

You think the "set" prefix makes it a setter?  Even though no
Smalltalker prefixes their setters with "set" and also it sets
multiple variables and also is categorized under "initialize-release"
instead of "accessing"?

That is three differences from what we think of as a "setter".  But
you say something that is different in 3 ways is "surreal" to call it
something else..   You need to refine your pattern language!   :)

> http://en.wikipedia.org/wiki/The_Treachery_of_Images ;)
>
> I suggest we concentrate on 1) - the single initializer pattern.


More information about the Squeak-dev mailing list