Skip to main content

What is type-safe code reuse?

  • Conference paper
  • First Online:
ECOOP'91 European Conference on Object-Oriented Programming (ECOOP 1991)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 512))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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.

    Google Scholar 

  2. L. Cardelli and P. Wegner. On understanding types, data abstraction, and polymorphism. ACM Computing Surveys, 17(4), December 1985.

    Google Scholar 

  3. William Cook, Walter Hill, and Peter Canning. Inheritance is not subtyping. In Seventeenth Symposium on Principles of Programming Languages. ACM Press, January 1990.

    Google Scholar 

  4. 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.

    Google Scholar 

  5. Scott Danforth and Chris Tomlinson. Type theories and object-oriented programming. ACM Computing Surveys, 20(1), March 1988.

    Google Scholar 

  6. A. Goldberg and D. Robson. Smalltalk-80—The Language and its Implementation. Addison-Wesley, 1983.

    Google Scholar 

  7. 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.

    Google Scholar 

  8. 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.

    Google Scholar 

  9. 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.

    Google Scholar 

  10. 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.

    Google Scholar 

  11. Bertrand Meyer. Object-Oriented Software Construction. Prentice-Hall, Englewood Cliffs, NJ, 1988.

    Google Scholar 

  12. Jens Palsberg and Michael I. Schwartzbach. Genericity And Inheritance. Computer Science Department, Aarhus University. PB-318, 1990.

    Google Scholar 

  13. 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.

    Google Scholar 

  14. 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.

    Google Scholar 

  15. 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.

    Google Scholar 

  16. B. Stroustrup. The C++ Programming Language. Addison-Wesley, 1986.

    Google Scholar 

  17. Niklaus Wirth. Programming in Modula-2. Springer-Verlag, New York, 1985.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Pierre America

Rights and permissions

Reprints 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

Publish with us

Policies and ethics