GJ - A Generic Java Extension

Martin Odersky <cismxo@cis.unisa.edu.au>
9 Jun 1998 12:23:30 -0400

          From comp.compilers

Related articles
GJ - A Generic Java Extension cismxo@cis.unisa.edu.au (Martin Odersky) (1998-06-09)
| List of all articles for this month |

From: Martin Odersky <cismxo@cis.unisa.edu.au>
Newsgroups: comp.compilers
Date: 9 Jun 1998 12:23:30 -0400
Organization: Compilers Central
Keywords: Java, available, types

We are pleased to announce

                                        GJ - A Generic Java Extension

GJ is an extension of the Java programming language that supports
generic types.

*Support for generics* Many data types are generic over some other
data type, and this is especially common for reusable libraries such
as collection classes. GJ supports the use of such types, for
instance allowing one to write the GJ type Vector<String> as opposed
to the Java type Vector. With GJ, fewer casts are required, and the
compiler catches more errors.

*Superset of the Java programming language* Every Java source programq
is still legal and retains the same meaning in GJ. The GJ compiler can
be used as a Java compiler.

*Compiles into the Java Virtual Machine* GJ compiles into JVM code,
so GJ programs run on any Java platform, including Java compliant
browsers. Class files produced by the GJ compiler can be freely mixed
with those produced by other Java compilers.

*Compatible with existing libraries* One can call any Java library
function from GJ. Further, where it is sensible, one can assign GJ
types to existing Java libraries. For instance, the GJ type
Vector<String> is implemented by the Java library type Vector.

*Efficient translation* GJ is translated by erasure: no information
about type parameters is maintained at run-time. This means GJ code is
pretty much identical to Java code for the same purpose, and equally

*Freely available and fully documented* The GJ compiler is itself
written in GJ, so it runs on any platform that supports Java. The GJ
compiler is available for download, and there is extensive

GJ was designed by Gilad Bracha of JavaSoft, Martin Odersky of the
University of South Australia, David Stoutamire of JavaSoft, and
Philip Wadler of Bell Labs, Lucent Technologies. GJ is based on
Odersky and Wadler's previous work on Pizza, but there are also some

GJ can be obtained from sites



  -- Martin Odersky, Philip Wadler

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.