[squeak-dev] Why is #String->String an Alias?

Chris Muller asqueaker at gmail.com
Thu Dec 19 22:08:57 UTC 2013


On Thu, Dec 19, 2013 at 4:03 PM, Bert Freudenberg <bert at freudenbergs.de> wrote:
>
> On 19.12.2013, at 22:53, Chris Muller <asqueaker at gmail.com> wrote:
>
>> On Tue, Dec 17, 2013 at 7:35 PM, Nicolas Cellier
>> <nicolas.cellier.aka.nice at gmail.com> wrote:
>>> Bingo, by instrumenting basicNew with self name == #Alias ifTrue: [self
>>> haltOnce], I got my first Alias during update 228, with previous version of
>>
>> Where did you put that in relation to the primitive call?
>
> I don't think you can do it without adding a new method:
>
> Behavior>>basicNew
>         self name == #Alias ifTrue: [self haltOnce].
>         ^ self actualBasicNew
>
> But what I'd actually do is this:
>
> Alias class>>basicNew
>         self haltOnce.
>         ^ super basicNew
>
> Then you would only have to check for "self name == #Alias" if Alias had subclasses.

Alias doesn't exist yet in the image, somewhere the update process
bring it in and creates instances of it.

Trying to chase that down, so I put the basicNew override in ClassDescription.


More information about the Squeak-dev mailing list