Abstract
Subclassing is reuse of class definitions. It is usually tied to the use of class names, thus relying on the order in which the particular classes in a program are created. This is a burden, however, both when programming and in theoretical studies.
This paper presents a structural notion of subclassing for typed languages. It is a direct abstraction of the Smalltalk interpreter and the separate compilation technique of Modula. We argue that it is the most general mechanism which can be supported by the implementation while relying on the type-correctness of superclasses. In short, it captures type-safe code reuse.
Preview
Unable to display preview. Download preview PDF.
References
L. Cardelli. A semantics of multiple inheritance. In G. Kahn, D. MacQueen, and Gordon Plotkin, editors, Semantics of Data Types, pages 51–68. Springer-Verlag (LNCS 173), 1984.
L. Cardelli and P. Wegner. On understanding types, data abstraction, and polymorphism. ACM Computing Surveys, 17(4), December 1985.
William Cook, Walter Hill, and Peter Canning. Inheritance is not subtyping. In Seventeenth Symposium on Principles of Programming Languages. ACM Press, January 1990.
William Cook and Jens Palsberg. A denotational semantics of inheritance and its correctness. In Proc. OOPSLA'89, ACM SIGPLAN Fourth Annual Conference on Object-Oriented Programming Systems, Languages and Applications, 1989. To appear in Information and Computation.
Scott Danforth and Chris Tomlinson. Type theories and object-oriented programming. ACM Computing Surveys, 20(1), March 1988.
A. Goldberg and D. Robson. Smalltalk-80—The Language and its Implementation. Addison-Wesley, 1983.
Justin O. Graver and Ralph E. Johnson. A type system for Smalltalk. In Seventeenth Symposium on Principles of Programming Languages, pages 136–150. ACM Press, January 1990.
Justin Owen Graver. Type-Checking and Type-Inference for Object-Oriented Programming Languages. PhD thesis, Department of Computer Science, University of Illinois at Urbana-Champaign, August 1989. UIUCD-R-89-1539.
B. B. Kristensen, O. L. Madsen, B. MØller-Pedersen, and K. Nygaard. The BETA programming language. In B. Shriver and P. Wegner, editors, Research Directions in Object-Oriented Programming, pages 7–48. MIT Press, 1987.
Ole L. Madsen and Birger MØller-Pedersen. Virtual classes: A powerful mechanism in object-oriented programming. In Proc. OOPSLA'89, Fourth Annual Conference on Object-Oriented Programming Systems, Languages and Applications. ACM, 1989.
Bertrand Meyer. Object-Oriented Software Construction. Prentice-Hall, Englewood Cliffs, NJ, 1988.
Jens Palsberg and Michael I. Schwartzbach. Genericity And Inheritance. Computer Science Department, Aarhus University. PB-318, 1990.
Jens Palsberg and Michael I. Schwartzbach. Type substitution for object-oriented programming. In Proc. OOPSLA/ECOOP'90, ACM SIGPLAN Fifth Annual Conference on Object-Oriented Programming Systems, Languages and Applications; European Conference on Object-Oriented Programming, 1990.
Jens Palsberg and Michael I. Schwartzbach. Object-oriented type inference. In Proc. OOPSLA'91, ACM SIGPLAN Sixth Annual Conference on Object-Oriented Programming Systems, Languages and Applications, 1991.
Claus H. Pedersen. Extending ordinary inheritance schemes to include generalization. In Proc. OOPSLA'89, ACM SIGPLAN Fourth Annual Conference on Object-Oriented Programming Systems, Languages and Applications, 1989.
B. Stroustrup. The C++ Programming Language. Addison-Wesley, 1986.
Niklaus Wirth. Programming in Modula-2. Springer-Verlag, New York, 1985.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1991 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Palsberg, J., Schwartzbach, M.I. (1991). What is type-safe code reuse?. In: America, P. (eds) ECOOP'91 European Conference on Object-Oriented Programming. ECOOP 1991. Lecture Notes in Computer Science, vol 512. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0057030
Download citation
DOI: https://doi.org/10.1007/BFb0057030
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-54262-9
Online ISBN: 978-3-540-47537-8
eBook Packages: Springer Book Archive