Abstract
Method inheritance and data abstraction are central features of object-oriented programming that are attained through a hierarchical organization of classes. Recent studies have shown that method inheritance can be supported by an ML style type inference when extended to labeled records. This is based on the observation that a function that selects a field f of a record can be given a polymorphic type that enables it to be applied to any record which contains a field f. Several type systems also provide data abstraction through abstract type declarations. However, these two features have not yet been properly integrated in a statically checked polymorphic type system.
This paper proposes a static type system that achieves this integration in an ML-like polymorphic language by adding a class construct which allows the programmer to build a hierarchy of classes connected by multiple inheritance declarations. Classes can be parameterized by types allowing "generic" definitions. The type correctness of class declarations is statically checked, and a principal scheme is inferred for any type correct program containing methods and objects defined in classes. Moreover, the type system can be extended to include the structures and operations needed for database programming and therefore can serve as a basis of an object-oriented database programming language.
Original language | English |
---|---|
Title of host publication | Theoretical Aspects of Object-Oriented Programming |
Editors | C.A. Gunter, J.C. Mitchel |
Publisher | MIT Press |
Pages | 121-148 |
Number of pages | 28 |
ISBN (Print) | 978-0262071550 |
Publication status | Published - 1994 |