[ENH request] self class.

Avi Bryant avi at beta4.com
Thu Oct 14 13:00:19 UTC 2004


On Oct 14, 2004, at 2:49 PM, Jon Hylands wrote:

> On Thu, 14 Oct 2004 21:07:59 +1300, Michael van der Gulik
> <squeakml at gulik.co.nz> wrote:
>
>> Would it be possible to rename the primitive Object>>class to
>> Object>>basicClass, and then implement Object>>class as:
>
> In many Smalltalks, you can't override #class. Squeak is one of those 
> --
> you can comment out the primitive call in Object >> #class, and 
> everything
> still works fine. The compiler short-circuits the message, and just 
> answers
> the class (or something like that).

Not even the compiler, IIRC - it's the VM that short circuits it.  This 
is a pretty unnecessary optimization these days, and I'd also like to 
see it disappear...

Avi




More information about the Squeak-dev mailing list