Adding Wildcards to the Java Programming Language

Feb 8th, 2010 | By administrator | Category: Java

This paper describes wildcards, a new language construct designed to increase the ? exibility of object-oriented type systems with parameterized classes. Based on the notion of use site variance, wildcards provide a type safe abstraction over diferent instantiations of parameterized classes, by using ‘?’ to denote unspecifed type arguments. Thus they essentially unify the distinct families of classes often introduced by parametric polymorphism. Wildcards are implemented as part of the up coming addition of generics to the JavaTM programming language, and will thus be deployed world wide as part of the reference implementation of the Java compiler java c available from Sun Microsystems, Inc. By providing a richer type system, wildcards allow for an improved type inference scheme for polymorphic method calls. Moreover, by means of a novel notion of wildcard capture, polymorphic methods can be used to give symbolic names to unspecifed types, in a manner similar to the “open” construct known from existential types. Wildcards show up innumerous places in the Java Platform APIs of the upcoming release, and some of the examples in this paper are taken from these APIs.

Source : bracha.org

Download Ebook

Tags: , , , ,

Related Ebook :

Leave Comment