LISP and Symbolic Computation, 4(3)207-222
Parents are Shared Parts of Objects: Inheritance and Encapsulation in SELF
Craig Chambers, Computer Systems Laboratory, Stanford University, Stanford, California 94305
David Ungar, Computer Systems Laboratory, Stanford University, Stanford, California 94305
Bay-Wei Chang, Computer Systems Laboratory, Stanford University, Stanford, California 94305
Urs Hölzle, Computer Systems Laboratory, Stanford University, Stanford, California 94305
|
Abstract: The design of inheritance and encapsulation in SELF,
an object-oriented language based on prototypes, results from
understanding that inheritance allows parents to be shared parts of
their children. The programmer resolves ambiguities arising from
multiple inheritance by prioritizing an object's parents. Unifying
unordered and ordered multiple inheritance supports differential
programming of abstractions and methods, combination of unrelated
abstractions, unequal combination of abstractions, and mixins. In
SELF, a private slot may be accessed if the sending method is a shared
part of the receiver, allowing privileged communication between
related objects. Thus, classless SELF enjoys the benefits of
class-based encapsulation.
|
[local copy]
|
|