A Generic Java Language Extension
There are three papers on GJ.
Also: Guy Steele's delightful keynote address at OOPSLA 98, Growing a Language, argues that Java will age better if it is extended to include operator overloading and generic types. (Available in: ps, pdf.) (This is a preliminary version. The final version was published as: Guy L. Steele, Jr., ``Growing a Language'', Journal of Higher-Order and Symbolic Computation (Kluwer) 12, 3 (October 1999), 221--236.)
Also: See papers on GJ, Pizza, and Java on Philip Wadler's home page.
Making the future safe for the past: Adding Genericity to the Java Programming LanguageGilad Bracha, Martin Odersky, David Stoutamire, and Philip Wadler. OOPSLA 98, Vancouver, October 1998.
We present GJ, a design that extends the Java programming language with generic types and methods. These are both explained and implemented by translation into the unextended language. The translation closely mimics the way generics are emulated by programmers: it erases all type parameters, maps type variables to their bounds, and inserts casts where needed. Some subtleties of the translation are caused by the handling of overriding.
GJ increases expressiveness and safety: code utilizing generic libraries is no longer buried under a plethora of casts, and the corresponding casts inserted by the translation are guaranteed to not fail.
GJ is designed to be fully backwards compatible with the current Java language, which simplifies the transition from non-generic to generic programming. In particular, one can retrofit existing library classes with generic interfaces without changing their code.
An implementation of GJ has been written in GJ, and is freely available on the web.
GJ: Extending the Java Programming Language with type parametersGilad Bracha, Martin Odersky, David Stoutamire, and Philip Wadler. Manuscript, March 1998; revised August 1998.
This tutorial introduces the concepts of GJ by example.
GJ SpecificationGilad Bracha, Martin Odersky, David Stoutamire, and Philip Wadler. Manuscript, May 1998.
This specification defines GJ in rigorous detail.
Comments and bug reports to the Pizza Group, firstname.lastname@example.org. Java is a trademark of Sun Microsystems. All software and documents on the Pizza site are © Copyright 1996, 1997 by the respective authors as attributed on each. Terms for redistribution are available.