Subtyping is not a good “match” for object-oriented languages

KB Bruce, L Petersen, A Fiech - … Jyväskylä, Finland, June 9–13, 1997 …, 1997 - Springer
KB Bruce, L Petersen, A Fiech
ECOOP'97—Object-Oriented Programming: 11th European Conference Jyväskylä …, 1997Springer
We present the design and rationale of a new statically-typed object-oriented language,
LOOM. LOOM, retains most of the features of the earlier language PolyTOIL. However the
subtyping relation is dropped from LOOM in favor of the matching relation.“Hash types”,
which are denned in terms of matching, are introduced to provide some of the benefits of
subtyping. These types can be used to provide support for heterogeneous data stuctures in
LOOM. LOOM. is considerably simpler than PolyTOIL, yet is just as expressive. The type …
Abstract
We present the design and rationale of a new statically-typed object-oriented language, LOOM. LOOM, retains most of the features of the earlier language PolyTOIL. However the subtyping relation is dropped from LOOM in favor of the matching relation. “Hash types”, which are denned in terms of matching, are introduced to provide some of the benefits of subtyping. These types can be used to provide support for heterogeneous data stuctures in LOOM. LOOM. is considerably simpler than PolyTOIL, yet is just as expressive. The type system for the language is decidable and provably type safe. The addition of modules to the language provides better control over information hiding and allows the provision of access like that of C++'s friends.
Springer