Slot inheritance was invented for AI and other reasoning systems -- and also for providing protection of polymorphic meanings. One of the ways of looking at it is that for many objects, the contents of the instance variables can be thought of as "parts". Thus, one could imagine a lookup strategy that would search down through the instance variables for ideas and info about the object. An example might be to deal with the question "how heavy?" the idea might be to look at the slot called "material" and ask the actual value for help. It could in turn ask its variables for help, etc. So this gives a dynamic way to enlarge the property space of an object. If you include the static superclass chain in the mix of searched variables, then you get regular inheritance. This is one of the many inheritance strategies used in CYC. Another view of this is to consider the polymorphic meaning of "print" in Smalltalk. There is no protection of the generic meaning, any programmer can write whatever they want in a method. However, we could make a subclass of class Method called Print whose instances are Print-Methods. These would not allow arbitrary code to be written in them, but might have places where programmers could add useful ideosyncratic information. All of these print methods would really try to print something. So slot classes and slot inheritance allow real definitions and protections of meanings. This idea also goes back to the early 70s.
All these were easy to do in ST-72 because each class/closure/instance really got passed control *before* the message was received. There were some suggestions that a "prereceive" method be allowed in ST-76 and -80 -- if present, a flag would be set somewhere efficient, and it would be called first with the actual message put in a place where it could be received later. This would have allowed all of these schemes, delegation, etc., to also be done in the later versions of ST. Someone on the list might want to figure out good ways to do these schemes in Squeak. Folks like Nathanial Scharli and Stephane, who are playing with metasystems, should add these kinds of considerations into their play.
Etc.
Cheers,
Alan
-------
At 3:32 PM +0200 5/1/02, Henrik Gedenryd wrote:
stephane ducasse (home) wrote:
What was slot inheritance?
Stef
As I understand it that was a precursor of delegation a la Lieberman and then Self and so on: inheritance goes via the slots instead of via the class.
But this understanding is based on very scarce information.
Henrik
--