[Vm-dev] flat objects in Self
Jecel Assumpcao Jr.
jecel at merlintec.com
Fri Jun 10 02:14:50 UTC 2011
> Are you sure that Self allows named and indexable slots? What's an example in Self?
I'm pretty sure, but can't reach my copy of Craig Chambers' thesis right
now and it doesn't seem to be available online. None of the other
documentation mentions this. Sadly, Self 4.4 is now generating a
segfault on this machine (my Fedora 10 installation is causing lots of
problems like this). But looking at the Self sources (not VM) for 4.1.6
it seems that "processStack" is created by cloning a vector, removing
the "parent" slot and then adding "cache", "format", "myProcess" as data
slots and then "parent" as a constant parent slot. In the old UI1
experiment (Morphic is UI2) something similar is done for object
"enumResult". Like I said, this is rarely used (these were the only
examples I found).
> > Do you mean at runtime or at design time (converting the image once)? If
> > the latter, I had the impression that this was first proposed at
> > Tektronix (after the versions described in the green book). But I don't
> > trust my memory on this.
> Im sure it was incremental. There is a full become: in BS but its slow and hence to
> speed the system up changes were made to certain core classes to reduce becomming.
> IIRC these changes were available in a change set called unbecomming.st :)
It is very common for people to get excited by a new feature (like
become in Smalltalk-78 or dynamic inheritance in Self) and try to use it
as much as possible, even where "conventional" solutions would be as
good or even better. Eventually it either dies out or is limited to
where it makes sense.
More information about the Vm-dev