[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Inheritance of instance slots, KEVO



What I currently do is the "_Define _AddSlots:" cliche Dave Ungar
posted. Out of interest, I checked back through my archive of the
mailing list - almost _two years ago_, Bill Burdick and Bay-Wei Chang,
I think, seemed to work this one out.

Urs Hoelzle writes:
> 3.  Through the programming environment.

Something I've seen recently (came over the net) is Kevo, yet another
prototype prototype-based OOPL. (this one is a mutant FORTH). Although
prototype based, it claims not to provide inheritance; rather,
everything is managed by clever copying. So where we inherit, Kevo
just copies and does _AddSlots. The catch is that Kevo has another
version of _AddSlots with adds the slots to each member of a group of
objects. Where we would modify a parent, Kevo modifies each object in
the group. Kevo has three levels of "propagation": an individual
object; a object and all unmodified copies (clones); an object and all
modified copies of the object (descendants).

This approach could (in fact) be implemented in Self as it stands,
with judicious use of the Mirror references methods. And (I think)
were some of the information in the compiler's object maps brought out
to the programmer (browse all objects cloned from this object) this
would be even easier. I think this would be more within the style of
Self than adding complicated constraints to the programming
environment - but that's just my opinion. Adding general constraints
to the language - say like Brad Myer's KR object system in Lisp - now
there's an idea!

WRT Kevo, I think the author (Antero Taivalsaari) will be at OOPSLA
for those of you lucky enough to be going :-) I don't particularly
like Kevo (although I'm happy to believe it may be the best OO FORTH -
CUP TEA OF MY FORTH IS NOT). And, as far as I can see, the Kevo scheme
(using copying rather than inheritance, with mechanisms for managing
copying) is no more powerful than inheritance and has one big
drawback: the inheritance hierarchy is no longer manifest in the
program's basic structure.

kjx

(Self bigot flame mode on) 
Hmm - I guess Self (at over two years in public release) must be
considered a "mature" language now. I'm sure that's older than the
latest version of C++ for instance!
(Self bigot flame mode off)

kjx