Torgersen, Mads2; Ernst, Erik5; Hansen, Christian Plesner4
1 Department of Computer Science, Faculty of Science, Aarhus University, Aarhus University2 Microsoft3 Department of Computer Science, Science and Technology, Aarhus University4 Esmertec5 Department of Computer Science, Science and Technology, Aarhus University
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