GJ

Home
Mirrors
Distribution
Documents
Applications
People
Related
FAQ 

A Generic Java Language Extension

Documents

There are three papers on GJ.

Documentation on libraries and tools is available on the distribution page.

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, ps.gz.)

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 Language

Gilad 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.

Available in: (letter) dvi, ps, pdf, dvi.gz, ps.gz, (a4) dvi, ps, pdf, dvi.gz, ps.gz,


GJ: Extending the Java Programming Language with type parameters

Gilad Bracha, Martin Odersky, David Stoutamire, and Philip Wadler. Manuscript, March 1998; revised August 1998.

This tutorial introduces the concepts of GJ by example.

Available in: (letter) dvi, ps, pdf, dvi.gz, ps.gz, (a4) dvi, ps, pdf, dvi.gz, ps.gz,


GJ Specification

Gilad Bracha, Martin Odersky, David Stoutamire, and Philip Wadler. Manuscript, May 1998.

This specification defines GJ in rigorous detail.

Available in: (letter) dvi, ps, pdf, dvi.gz, ps.gz, (a4) dvi, ps, pdf, dvi.gz, ps.gz,


Comments and bug reports to the Pizza Group, pizza@cis.unisa.edu.au. 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.