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.
Similar content being viewed by others
References
Bobrow, D. G., DeMichiel, L. G., Gabriel, R. P., Keene, S. E., Kiczales, G., and Moon, D. A. Common Lisp Object System Specification. Published asSIGPLAN Notices, 23, 9 (1988).
Bobrow, D. G., Kahn, K., Kiczales, G., Masinter, L., Stefik, M., and Zdybel, F. CommonLoops: Merging Lisp and Object-Oriented Programming. InOOPSLA '86 Conference Proceedings. Published asSIGPLAN Notices, 21, 11 (1986) 17–29.
Borning, A. H. Classes Versus Prototypes in Object-Oriented Languages. InProceedings of the ACM/IEEE Fall Joint Computer Conference (1986) 36–40.
Chambers, C., and Ungar, D. Customization: Optimizing Compiler Technology for SELF, a Dynamically-Typed Object-Oriented Programming Language. InProceedings of the SIGPLAN '89 Conference on Programming Language Design and Implementation. Published asSIGPLAN Notices, 24, 7 (1989) 146–160.
Chambers, C., Ungar, D., and Lee, E. An Efficient Implementation of SELF, a Dynamically-Typed Object-Oriented Language Based on Prototypes. InOOPSLA '89 Conference Proceedings. Published asSIGPLAN Notices, 24, 10 (1989) 49–70. Also inLisp and Symbolic Computation, 4, 3 (1991) 243–281.
Cunningham, W. Objects without inheritance. Personal communication (1989).
Goldberg, A., and Robson, D.Smalltalk-80: The Language and Its Implementation. Addison-Wesley, Reading, MA (1983).
Kristensen, B. B., Madsen, O. L., Møller-Pedersen, and Nygaard, K. The BETA Programming Language. In Shriver, B., and Wegner, P., editors,Research Directions in Object-Oriented Programming, The MIT Press, Cambridge, MA (1987).
LaLonde, W. R. Designing Families of Data Types Using Exemplars. InACM Transactions on Programming Languages and Systems, 11, 2 (1989) 212–248.
LaLonde, W. R., Thomas, D. A., and Pugh, J. R. An Exemplar Based Smalltalk. InOOPSLA '86 Conference Proceedings. Published asSIGPLAN Notices, 21, 11 (1986) 322–330.
Lee, E.Object Storage and Inheritance for SELF, a Prototype-Based Object-Oriented Programming Language. Engineer's thesis, Stanford University (1988).
Lieberman, H. Using Prototypical Objects to Implement Shared Behavior in Object-Oriented Systems. InOOPSLA '86 Conference Proceedings. Published asSIGPLAN Notices, 21, 11 (1986) 214–223.
Madsen, O. L., and Møller-Pedersen, B. Virtual Classes: A Powerful Mechanism in Object-Oriented Programming. InOOPSLA '89 Conference Proceedings. Published asSIGPLAN Notices, 24, 10 (1989) 397–406.
Meyer, B. Genericity versus Inheritance. InOOPSLA '86 Conference Proceedings. Published asSIGPLAN Notices, 21, 11 (1986) 391–405.
Meyer, B.Eiffel: An Introduction, Version 2.1. TR-EI-3/GI, Interactive Soft-ware Engineering, Inc., Goleta, CA (1988).
Moon, D. A. Object-Oriented Programming with Flavors. InOOPSLA '86 Conference Proceedings. Published asSIGPLAN Notices, 21, 11 (1986) 1–16.
Schaffert, C., Cooper, T., and Wilpolt, C.Trellis Object-Based Environment: Language Reference Manual, Version 1.1. DEC-TR-372, Digital Equipment Corp., Hudson, MA (1985).
Schaffert, C., Cooper, T., Bullis, B., Kilian, M., and Wilpolt, C. An Introduction to Trellis/Owl. InOOPSLA '86 Conference Proceedings. Published asSIGPLAN Notices, 21, 11 (1986) 9–16.
Smith, R. B. Objects without inheritance. Personal communication (1990).
Snyder, A.CommonObjects: An Overview. STL-86-13, Hewlett-Packard Laboratories, Palo Alto, CA (1986).
Snyder, A. Encapsulation and Inheritance in Object-Oriented Programming Languages. InOOPSLA '86 Conference Proceedings. Published asSIGPLAN Notices, 21, 11 (1986) 17–29.
Stein, L. A. Delegation Is Inheritance. InOOPSLA '87 Conference Proceedings. Published asSIGPLAN Notices, 22, 12 (1987) 138–146.
Stroustrup, B.The C++ Programming Language. Addison-Wesley, Reading, MA (1986).
Stroustrup, B. The Evolution of C++: 1985 to 1987. InUSENIX C++ Workshop Proceedings (1987) 1–21.
Ungar, D., and Smith, R. B. SELF: The Power of Simplicity. InOOPSLA '87 Conference Proceedings. Published asSIGPLAN Notices, 22, 12 (1987) 227–241. Also inLisp and Symbolic Computation, 4, 3 (1991) 187–205.
Wegner, P. Dimensions of Object-Based Language Design. InOOPSLA '87 Conference Proceedings. Published asSIGPLAN Notices, 22, 12 (1987) 168–182.
Author information
Authors and Affiliations
Additional information
This work has been generously supported by National Science Foundation Presidential Young Investigator Grant #CCR-8657631, and by Sun Microsystems, IBM, Apple Computer, Cray Laboratories, Tandem Computers, NCR, Texas Instruments, and DEC.
Rights and permissions
About this article
Cite this article
Chambers, C., Ungar, D., Chang, BW. et al. Parents are shared parts of objects: Inheritance and encapsulation in SELF. Lisp and Symbolic Computation 4, 207–222 (1991). https://doi.org/10.1007/BF01806106
Issue Date:
DOI: https://doi.org/10.1007/BF01806106