[self-interest] embedding based prototype languages
Jecel Assumpcao Jr
jecel at merlintec.com
Mon Sep 30 22:37:56 UTC 2002
On Monday 30 September 2002 14:16, James McCartney wrote:
> Is there a list for discussing prototype languages in general?
There were one or two attempts to start one. Currently there is a more
generic "langsmiths" list at Yahoo groups where you can find interested
people. But posting here is probably a good way to reach people
interested in prototype based languages.
> I am interested in figuring out some details concerning languages
> like Omega, Kevo, Obliq that prefer embedding over delegation. The
> idea of embedding never really made sense to me until I read some
> slides by Luca Cardelli ("Object based vs Class based Languages",
> PLDI 96 Tutorial).
Thanks for the referece. I hadn't seen it before and it is very
interesting:
http://research.microsoft.com/Users/luca/Slides/PLDI96Tutorial.pdf
> Some things still seem problematic with the
> approach. I like a few things about it, easy to make dispatch fast,
> objects are self sufficient. For me, fast dispatch is important since
> I am currently using a Smalltalk-like language with constant time
> dispatch.
And I am implementing a version of Self with constant time dispatch (1
clock, not counting cache misses). It doesn't have dynamic inheritance
and wastes memory. You can say that "under the hood" it uses embedding
instead of delegation. But it looks like normal Self at the programming
level.
> It seems that change management would be a nightmare when you want
> to update a method that was inherited by a lot of objects. This might
> be solved by using "become:" ?? The slides contain this quote: "In
> embedding based languages such as Kevo and Omega, pervasive changes
> are achieved even without donor hierarchies." How?
The main complication is how to express such sweeping changes in these
languages. At the implementation level it doesn't look like much of a
problem to me if you can accept that such changes might take a second
or two.
> Also it seems more difficult to use inheritance in certain "part-of"
> situations (as was done NewtonScript for example), or doing so would
> cause a lot of unecessary space usage.
Again, space usage problems can be solved with implementation tricks.
But embedding languages have a more static feel to them, in my opinion,
and wouldn't work as well in the kind of programming that NewtonScript
was used for.
> This quote is also there: "Super and override make sense for
> implicit inheritance but not for explicit inheritance." But don't you
> still need to call the 'super' method in the (explicitly) overriding
> method sometimes?
Indeed, but by definition you already have some notation for talking
about the methods/attributes that you are explicitly inheriting. So you
can use that notation instead of something more "magic" like "super".
> Another observation is that if you have doesNotUnderstand: then it
> is trivial to reimplement parent delegation in an embedding only
> language. So why not build it in to the dispatch routine anyway?
Sure, but then it becomes a delegating language instead of an embedding
one, right? Note that you might not be able to fully emulate delegation
without some language support - in "real" delegation the value of self
is the receiver of the original message, not the receiver of the
delegated one.
> I can't seem to find any info at all on the web on Kevo other than
> brief mentions.
Kevo itself (for the Mac) was posted to this list a month or two ago. I
have not had much luck finding papers about it. "On the Notion of
Inheritance" is interesting, if you haven't already read it:
http://www.csee.umbc.edu/331/resources/papers/Inheritance.pdf
> Omega seems very out of date. I'm unsure of the status of Obliq.
My impression is that all interest in languages that weren't slightly
patched Java died out in 1997 or so. But I could be wrong...
-- Jecel
More information about the Self-interest
mailing list