Sciweavers

OOPSLA
2009
Springer

Self type constructors

13 years 11 months ago
Self type constructors
Bruce and Foster proposed the language LOOJ, an extension of Java with the notion of MyType, which represents the type of a self reference and changes its meaning along with inheritance. MyType is useful to write extensible yet typesafe classes for objects with recursive interfaces, that is, ones with methods that take or return objects of the same type as the receiver. Although LOOJ has also generics, MyType has been introduced as a feature rather orthogonal to generics. As a result, LOOJ cannot express an interface that refers to the same generic class recursively but with different type arguments. This is a significant limitation because such an interface naturally arises in practice, for example, in a generic collection class with method map(), which converts a collection to the same kind of collection of different elements. Altherr and Cremet and Moors, Piessens, and Odersky gave solutions to this problem but they used a highly sophisticated combination of advanced mechanisms su...
Chieri Saito, Atsushi Igarashi
Added 27 May 2010
Updated 27 May 2010
Type Conference
Year 2009
Where OOPSLA
Authors Chieri Saito, Atsushi Igarashi
Comments (0)