"is a" relationships
Dave Ungar
David.Ungar at Eng.Sun.COM
Thu Sep 24 20:54:00 UTC 1992
The other way to get inheritance of structure in Self
is to _Define your prototypes as copies of the ones you want to extend:
... addSlotsIfAbsent ...
traits animal _Define: ( |
p* = traits clonable.
animal behavior
| )
animal _Define: ( |
p* = traits animal.
animal data slots
| )
traits mammal _Define: ( |
p* = traits animal.
mammal behavior
| )
mammal _Define: animal copy _AddSlots: ( |
p* = traits mammal.
mammal data slots
| )
Note the "animal copy _AddSlots:" this does the copy down when you read in
the file.
Dave
More information about the Self-interest
mailing list