Does #class deserve to be a very-special shortcut bytecode anymore?

ducasse ducasse at iam.unibe.ch
Sat Jan 5 21:44:12 UTC 2002


Hi stephen


> 
> I think Andreas' suggestion of having a special primitive to get the
> non-forged class is a good idea for cases where that's what you need.
> But I guess you'd have to have the primitive work on a parameter and not
> the receiver (otherwise, the existing primitive would work just fine).
> I'd even take this a step further and make the class accessible through
> a mirror based reflection scheme.  This would allow you to get at the
> class (and other things) without having to invoke an actual method, but
> still offer encapsulation through the mirror.  All of the #instVarAt:,
> #instVarAt:put:, and other such methods could be accessible through a
> mirror and removed from Object's protocol.

Since I saw the animorphic way of doing that, I'm really thinking that I
want to try. Moving all the reflective stuff into mirror.

I never wrote a primitive (yet). But for the instVarAt: the primitive right
now works on the receiver and with mirror all the reflection will be on
arguments. 

I would like to know if this means that I have to change the primitives like
instVarAt:  and recompile eveyrthing. May be I can try to add some
primitives to have the system still running plus having mirrors.
What is your experience?

Stef






More information about the Squeak-dev mailing list