On the (un)reality of Virtual Types Didier R Emy and J Er^ Ome Vouillon

We show, mostly through detailed examples, that programming patterns known to involve the notion of virtual types can be implemented directly and concisely using parametric poly-morphism. A signiicant improvement we make over previous approaches is to allow related classes to be deened independently. This solution is more exible, more general, and we believe, simpler than other type-safe solutions previously proposed. This approach can be applied to several languages with parametric polymorphism that can already type binary methods and have structural object types. We conclude that parametric polymorphism is always better than virtual types. Moreover, it avoids the introduction of a new non-atomic primitive construct.

[1]  Bent Bruun Kristensen,et al.  The BETA Programming Language , 1987, Research Directions in Object-Oriented Programming.

[2]  Mitchell Wand,et al.  Complete Type Inference for Simple Objects , 1987, LICS.

[3]  John C. Mitchell,et al.  F-bounded quantification for object-oriented programming , 1989 .

[4]  D. Rémy Algebres touffues. Application au typage polymorphe des objets enregistrements dans les langages fonctionnels , 1990 .

[5]  Benjamin C. Pierce,et al.  Higher-Order Subtyping , 1994, Theor. Comput. Sci..

[6]  Didier Rémy,et al.  Type inference for records in natural extension of ML , 1994 .

[7]  Jens Palsberg,et al.  Object-oriented type systems , 1994, Wiley professional computing.

[8]  Luca Cardelli,et al.  On Binary Methods , 1995, Theory Pract. Object Syst..

[9]  Kim B. Bruce,et al.  PolyTOIL: A Type-Safe Polymorphic Object-Oriented Language , 1995, ECOOP.

[10]  Camille Le Moniès de Sagazan Un système de types étiquetés polymorphes pour typer les calculs de processus à liaison noms-canaux dynamiques , 1995 .

[11]  Scott F. Smith,et al.  Sound polymorphic type inference for objects , 1995, OOPSLA.

[12]  Scott F. Smith,et al.  Type inference for recursively constrained types and its application to OOP , 1995, MFPS.

[13]  Kim B. Bruce Increasing Java's expressiveness with ThisType and match-bounded polymorphism , 1997 .

[14]  Martin Odersky,et al.  Pizza into Java: translating theory into practice , 1997, POPL '97.

[15]  Kim B. Bruce,et al.  Subtyping Is Not a Good "Match" for Object-Oriented Languages , 1997, ECOOP.

[16]  Martin Odersky,et al.  A Statically Safe Alternative to Virtual Types , 1998, ECOOP.

[17]  Mads Torgersen Virtual types are statically safe , 1998 .