Dan Sugalski writes: > At 2:38 PM +0100 2/26/04, Leopold Toetsch wrote: > >Simplifies compilers: > > > > newclass P1, "Foo" > > addattribute P1, "i" > > findclass I1, "Foo" > > new P2, I1 > > > > classoffset I2, P2 > > > >In static cases, where P2 is known to be a C<Foo>, attrib #0 ("i") would > >be always 0. That is, the C<classoffset> opcode can be omitted in that > >case. > > That's a very rare case, honestly, and since arguably every object is > a subclass of the base object class and people will end up sticking > attributes and methods into the base object class it's going to > happen anyway.
And how do we deal with an object already in existence when the base object gets an attribute added? Luke