[squeak-dev] 4.5 -- how should we proceed then?

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Tue Dec 24 00:31:07 UTC 2013


2013/12/24 Chris Muller <asqueaker at gmail.com>

> > The other point being whether to invoke new or basicNew is more germane,
> but
> > not invoking new is a way to tell my instances are not created like that.
>
> It's a way to tell your instances not to initialize _default values_, if
> any.
>
> If a var is added and you add an initialize method, oops.  You better
> change your constructor too, ha ha...
>
> Chris, that's not your best argument, what do you read here?
^self basicNew initializeWith: prefix
                        ^^^^^^^^^

Did you browse HashedCollection>>new: as I suggested?
It does not send #new, nor #initialize but #initialize:
This is fairly common in Squeak.


> > We
> > could push it further and redefine new ^self error as you suggested, but
> > it's quite heavy...
>
> Default values.
>
> Nah! We ain't gonna need such mock-ups, or we'll explicitely create some.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20131224/a87ee3b6/attachment.htm


More information about the Squeak-dev mailing list