Download:
|
by Jon Riecke
In Proceedings of the 1996 ACM SIGPLAN Conference on Programming Language Design and Implementation
http://www.cs.wisc.edu/~cs536-1/submissions/141.ps.gz
Add To MetaCart
Abstract:
This paper proposes a new approach to adding objects to the statically-typed, higher-order language Standard ML. Our approach sacrifices some of the expressiveness found in recently proposed schemes for typing object-oriented features, but by doing so, we avoid a tremendous amount of complexity in the type system. In fact, our system is a conservative extension of the SML type system, and preserves the important properties of SML: sound static typing, and type inference. Our approach is based on introducing object types, which have an explicitly declared subtyping hierarchy, and object constructors. Just as datatype constructors are used to guide type inference of recursive types, we use object type constructors to guide the inference of subtyping. The introduction of object constructors also has the effect of generalizing the SML case statement to be a typecase on object types. Using this mechanism, we can often recover type information that our type system cannot preserve statically. In addition to describing the features of OML, the paper includes examples of how features found in other objectoriented languages can be emulated in OML. It also discusses the formal properties of OML, and some of the implementation issues.
Citations
|
1463
|
The definition of Standard ML
– Milner, Tofte, et al.
- 1990
|
|
1127
|
SmallTalk 80: The Language and its Implementation
– Goldberg, Robson
- 1983
|
|
1064
|
A structural approach to operational semantics
– Plotkin
- 1981
|
|
762
|
On understanding types, data abstraction, and polymorphism
– Cardelli, Wegner
- 1985
|
|
628
|
Eiffel: The Language
– Meyer
- 1991
|
|
500
|
A semantics of multiple inheritance
– Cardelli
- 1984
|
|
483
|
Self: the power of simplicity, in
– Ungar, Smith
- 1987
|
|
410
|
A language with distributed scope
– Cardelli
- 1995
|
|
191
|
The Design and Evolution of C
– Stroustrup
- 1994
|
|
186
|
Common LISP: The Language
– Steele
- 1984
|
|
156
|
Systems Programming with Modula-3
– NELSON
- 1991
|
|
143
|
Complete type inference for simple objects
– Wand
- 1987
|
|
130
|
A type-based compiler for Standard ML
– Shao, Appel
- 1995
|
|
106
|
Sound polymorphic type inference for objects
– Eifrig, Smith, et al.
- 1995
|
|
105
|
A proposal for making eiffel type-safe
– Cook
- 1989
|
|
98
|
Bounded quantification is undecidable
– Pierce
- 1994
|
|
91
|
Control operators, the SECD machine, and the -calculus
– Felleisen, Friedman
- 1986
|
|
70
|
Type inference for records in a natural extension of ML
– Rémy
- 1993
|
|
61
|
Efficient inference of object types
– Palsberg
- 1995
|
|
52
|
ML with extended pattern matching and subtypes
– Jategaonkar, Mitchell
- 1988
|
|
49
|
On Subtyping and Matching
– Abadi, Cardelli
- 1996
|
|
46
|
An imperative object calculus
– Abadi, Cardelli
- 1995
|
|
42
|
Coercion and type inference (summary
– Mitchell
- 1984
|
|
40
|
Object-oriented Programming without Recursive Types
– Pierce, Turner
- 1993
|
|
33
|
Notes on Typed Object-Oriented Programming
– Fisher, Mitchell
- 1994
|
|
32
|
Statically typed friendly functions via partially abstract types
– Pierce, Turner
- 1993
|
|
30
|
A multi-threaded higherorder user interface toolkit
– Gansner, Reppy
- 1993
|
|
19
|
Compiling Standard ML for Efficient Execution on Modern Machines
– Shao
- 1994
|
|
17
|
A paradigmatic object-oriented language: design, static typing and semantics
– Bruce
- 1992
|
|
10
|
Type definitions with parameters
– Solomon
- 1978
|
|
4
|
Dylan: an object-oriented dynamic language
– Computer, Cambridge
- 1992
|
|
1
|
Principal types for functional programs
– Damas, Milner
- 1982
|
|
1
|
Simple object types for SML
– Reppy, Riecke
|