This paper presents a formalization of wildcards, which is one of the new features of the Java programming language in version JDK5.0. Wildcards help alleviating the impedance mismatch between generics, or parametric polymorphism, and traditional object-oriented subtype polymorphism. They do this by quantifying over parameterized types with different type arguments. Wildcards take inspiration from several sources including use-site variance, and they could be considered as a way to introduce a syntactically light-weight and not fully general kind of existential types into a main-stream language. This formalization describes the approach, in particular the wildcard capture process where the existential nature of wildcards becomes evident.
Proceedings of Fool 12, 2005
Main Research Area:
The Twelth International Workshop on Foundations of Object-Oriented Languages, 2005