Abstract
In this paper we introduce a statically-typed, functional, object-oriented programming language, TOOPL, which supports classes, objects, methods, instance variables, subtypes, and inheritance. It has proved to be surprisingly difficult to design statically-type object-oriented languages which are nearly as expressive as Smalltalk and yet have no holes in their typing systems. A particular problem with statically type checking object-oriented languages is determining whether a method provided in a superclass will continue to type check when inherited in a subclass. This problem is solved in our language by providing type checking rules which guarantee that a method which type checks as part of a class will type check correctly in all legal subclasses in which it is inherited. This feature enables library providers to provide only the interfaces of classes with executables and still allow users to safely create subclasses. The design of TOOPL has been guided by an analysis of the semantics of the language, which is given in terms of a sufficiently rich model of the F-bounded second-order lambda calculus. This semantics supported the language design by provided a means of proving that the type-checking rules for the language are sound, ensuring that well-typed terms produce objects of the appropriate type. In particular, in a well-typed program it is impossible to send a message to an object which lacks a corresponding method.
Cite
CITATION STYLE
Bruce, K. B. (1993). Safe type checking in a statically-typed object-oriented programming language. In Conference Record of the Annual ACM Symposium on Principles of Programming Languages (pp. 285–298). Publ by ACM. https://doi.org/10.1145/158511.158650
Register to see more suggestions
Mendeley helps you to discover research relevant for your work.