Eliminating superclass lookup in the VM (and dynamic composition of behavior)
Stephen Pair
spair at acm.org
Wed Dec 11 22:24:26 UTC 2002
Nathanael,
> But again, I think it that the hard thing is not to make this
> work at an implementation level. This is finally "just" VM
> hacking. (Don't take me the wrong way! I don't want to say
> that writing a good VM is simple at all. What I mean is that
> adding some more features to a language by extending the VM
> capabilities is usually not that hard).
Of course, it's entirely dependent on the nature of the change.
> I think it is a much bigger challange to find a good
> *conceptual* framework that provides more flexibility. In
> this particular case, a flexible MOP (Meta Object Protocol)
> could be a good candidate. (This would not only parameterize
> message send, but also define how the slots are organized
> (e.g., in a sort of array or in a hash-table), etc.)
Yes, I agree. What I'm after are a couple little things done in the VM
that will make such conceptual exercises easier. I've found that when
exploring ideas in Squeak (whose implematation would ultimately entail
VM modifications) that you do tend reach a certain "break even" point
where it *is* simpler to involve the VM in your prototyping efforts than
to continue to work around those limitations (or build layers of
abstraction on top of the current system).
I understand inheritance, multiple inheritance, Self, MOP, Traits,
delegation, etc well enough to have come to the conclusion that any one
or perhaps all of these models could be useful in certain contexts and
for certain problem domains. I am not seeking to enable any specific
one, but rather all of them.
- Stephen
More information about the Squeak-dev
mailing list
|