[ENH request] self class.
Avi Bryant
avi at beta4.com
Thu Oct 14 13:11:54 UTC 2004
On Oct 14, 2004, at 3:06 PM, Lukas Renggli 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).
>
> I once did something similar: you can remove #class from the
> special-selectors collection in the compiler (class-var StdSelectors
> in ParseNode). From then on all methods you compile actually send the
> message #class and therefor it can also be overridden.
Oh, it's not in the VM - good. Markus, does the new Compiler package
still have this? Can we get rid of it?
Avi
More information about the Squeak-dev
mailing list
|