Much research has been performed with the aim of isolating the basic notions of object-oriented languages and of describing them by basic operators which can be embedded in strongly-typed languages. In this context we define an atomic linguistic construct to capture the notion of message passing, and we define a static and strong type system, based on subtyping, for this construct. Message passing is modelled as the application of an overloaded function, whose behavior is determined only at compile-time on the basis of the class which created a distinguished argument, the object “receiving” the message. By embedding this mechanism in a strongly-typed language with subtyping and abstract data types we can obtain the full functionality of object-oriented languages. We show that this approach is strictly more expressive then the usual interpretation of message passing as selection plus application of a functional record field.
[1]
Luca Cardelli,et al.
Subtyping recursive types
,
1991,
POPL '91.
[2]
Luca Cardelli,et al.
On understanding types, data abstraction, and polymorphism
,
1985,
CSUR.
[3]
John C. Mitchell.
Toward a typed foundation for method specialization and inheritance
,
1989,
POPL '90.
[4]
William R. Cook,et al.
Inheritance is not subtyping
,
1989,
POPL '90.
[5]
John C. Mitchell,et al.
Abstract types have existential types
,
1985,
POPL.
[6]
Luca Cardelli,et al.
A Semantics of Multiple Inheritance
,
1984,
Information and Computation.
[7]
Mitchell Wand,et al.
Type inference for record concatenation and multiple inheritance
,
1989,
[1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.
[8]
Giorgio Ghelli,et al.
Coherence of Subsumption
,
1990,
CAAP.