Inheritance is not subtyping

In typed object-oriented languages the subtype relation is typically based on the inheritance hierarchy. This approach, however, leads either to insecure type-systems or to restrictions on inheritance that make it less flexible than untyped Smalltalk inheritance. We present a new typed model of inheritance that allows more of the flexibility of Smalltalk inheritance within a statically-typed system. Significant features of our analysis are the introduction of polymorphism into the typing of inheritance and the uniform application of inheritance to objects, classes and types. The resulting notion of type inheritance allows us to show that the type of an inherited object is an inherited type but not always a subtype.

[1]  Ralph E. Johnson,et al.  TS: an optimizing compiler for smalltalk , 1988, OOPSLA '88.

[2]  John C. Mitchell,et al.  F-bounded polymorphism for object-oriented programming , 1989, FPCA.

[3]  Luca Cardelli. Amber Combinators and Functional Programming Languages , 1985, Lecture Notes in Computer Science.

[4]  David Robson,et al.  Smalltalk-80: The Language and Its Implementation , 1983 .

[5]  Mitchell Wand,et al.  Complete Type Inference for Simple Objects , 1987, LICS.

[6]  Henry Lieberman,et al.  Using prototypical objects to implement shared behavior in object-oriented systems , 1986, OOPLSA '86.

[7]  Bernard Robinet,et al.  Combinators and functional programming languages : Thirteenth Spring School of the LITP, Val d'Ajol, France, May 6-10, 1985, proceedings , 1986 .

[8]  Luca Cardelli,et al.  The Modula–3 type system , 1989, POPL '89.

[9]  Didier Rémy,et al.  Type checking records and variants in a natural extension of ML , 1989, POPL '89.

[10]  William R. Cook,et al.  Interfaces for strongly-typed object-oriented programming , 1989, OOPSLA '89.

[11]  簡聰富,et al.  物件導向軟體之架構(Object-Oriented Software Construction)探討 , 1989 .

[12]  Jens Palsberg,et al.  A Denotational Semantics af Inheritance and its Correctness , 1989 .

[13]  Justin O. Graver,et al.  Type checking and type inference for object-oriented programming languages , 1989 .

[14]  Craig Schaffert,et al.  An introduction to Trellis/Owl , 1986, OOPLSA '86.

[15]  John C. Mitchell Toward a typed foundation for method specialization and inheritance , 1989, POPL '90.

[16]  Alan Borning,et al.  A type declaration and inference system for smalltalk , 1982, POPL '82.

[17]  Luca Cardelli,et al.  A Semantics of Multiple Inheritance , 1984, Inf. Comput..

[18]  Luca Cardelli,et al.  On understanding types, data abstraction, and polymorphism , 1985, CSUR.

[19]  Mitchell Wand,et al.  Type inference for record concatenation and multiple inheritance , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[20]  Mitchell Wand,et al.  Type inference for record concatenation and multiple inheritance , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[21]  David A. Moon,et al.  Object-oriented programming with flavors , 1986, OOPLSA '86.

[22]  Jens Palsberg,et al.  A Denotational Semantics of Inheritance and its Correctness , 1989, OOPSLA.

[23]  Lynn Andrea Stein,et al.  Delegation is inheritance , 1987, OOPSLA '87.

[24]  William R. Cook,et al.  A Proposal for Making Eiffel Type-Safe , 1989, Comput. J..

[25]  Uday S. Reddy,et al.  Objects as closures: abstract semantics of object-oriented languages , 1988, LISP and Functional Programming.

[26]  O. J. Dahl,et al.  Simula Begin , 1979 .

[27]  William R. Cook,et al.  A denotational semantics of inheritance , 1989 .

[28]  Luca Cardelli,et al.  Structural subtyping and the notion of power type , 1988, POPL '88.