A Statically Safe Alternative to Virtual Types

@inproceedings{Bruce1998ASS,
  title={A Statically Safe Alternative to Virtual Types},
  author={Kim B. Bruce and Martin Odersky and Philip Wadler},
  booktitle={ECOOP},
  year={1998}
}
Parametric types and virtual types have recently been proposed as extensions to Java to support genericity. In this paper we investigate the strengths and weaknesses of each. We suggest a variant of virtual types which has similar expressiveness, but supports safe static type checking. This results in a language in which both parametric types and virtual types are well-integrated, and which is statically type-safe. 
Static Virtual Types in Java Layers
TLDR
This specification describes how a simple, static form of virtual typing can be implemented in a parametrically polymorphic version of Java, couched in terms of Java Layers.
Matching ThisType to subtyping
TLDR
This paper proposes two mechanisms, namely, nonheritable methods and local exactization to remedy the mismatch between ThisType and subtyping, and rigorously proves their safety by modeling them in a small calculus.
Matching MyType to subtyping
Using kinds to type partially-polymorphic methods
Bending without Breaking: Making Software More Flexible: Extended Abstract
TLDR
A staticallytype-safe solution is presented that involves the introduction of type groups, a construct that can be understood as a generalization of the MyType construct introduced in a statically type-safe way in languages like PolyTOIL and LOOM.
Exact type parameterization and ThisType support
TLDR
Three new language features are presented: exact type capture which relaxes the restriction of earlier static approaches to binary methods that the run-time type of a binary method's receiver should be statically fixed, named wildcards which allow more binary method invocations and more precise typing results, and virtual constructors which support method definitions with return types of ThisType.
Generics of a higher kind
TLDR
This paper presents the design and implementation of the resulting type constructor polymorphism in Scala, and studies how this feature interacts with existing object-oriented constructs, and shows how it makes the language more expressive.
Contraint-based polymorphism in Cecil: towards a practical and static type system
We present a static type system for object-oriented languages which strives to provide static typechecking without resorting to dynamic "type casts," restricting what code the programmer can write,
Constraint-Based Polymorphism in Cecil
We are developing a static type system for object-oriented languages that strives to guarantee statically and completely the absence of certain large classes of run-time errors, to enable polymorphic
...
...

References

SHOWING 1-10 OF 35 REFERENCES
Virtual types are statically safe
TLDR
This paper presents full statical type checking for virtual types, while not relying on any other special language mechanisms for safety.
Safe Static Type Checking With Systems of Mutually Recursive Classes and Inheritance
TLDR
This work proposes a variant of virtual classes which has similar expressiveness as virtual classes, but supports safe static type checking, and expresses this construct as an addition to Java, though similar constructs may be added to a variety of object-oriented languages.
Genericity in Java with Virtual Types
This paper suggests virtual types for Java, a language mechanism which subsumes parameterized classes, while also integrating more naturally with Java's object model. The same basic mechanism is also
Parameterized types for Java
TLDR
The rationale for the design decisions and the impact of the extension on other parts of Java, including arrays and the class library are discussed, and optional extensions to the Java virtual machine to allow parameterized bytecodes are described, and how to verify them efficiently.
Adding type parameterization to the Java language
TLDR
This paper proposes parameterized classes and interfaces in which the type parameter may be constrained to either implement a given interface or extend a given class, without introducing any new type relations into the language.
Increasing Java's expressiveness with ThisType and match-bounded polymorphism
TLDR
The main point of the language extensions are to support parametric polymorphism, but they also added features which provide better support for binary methods, a kind of method that is often diicult to support in a statically typed language.
Three Approaches to Type Structure
We examine three disparate views of the type structure of programming languages: Milner's type deduction system and polymorphic let construct, the theory of subtypes and generic operators, and the
Subtyping Is Not a Good "Match" for Object-Oriented Languages
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
A Paradigmatic Object-Oriented Programming Language: Design, Static Typing and Semantics
TLDR
This work describes the design of TOOPL, a paradigmatic, statically-typed, functional, object-oriented programming language which supports classes, objects, methods, hidden instance variables, subtypes and inheritance, and chooses to separate the inheritance and subtyping hierarchy in the language.
Pizza into Java: translating theory into practice
Pizza is a strict superset of Java that incorporates three ideas from the academic community: parametric polymorphism, higher-order functions, and algebraic data types. Pizza is defined by
...
...