Subject: Re: Parameterized types versus high-performance Java (fwd)

From: "Joseph D. Darcy" <[email-masked]>
Date: Wed, 2 Feb 2000 23:49:37 -0800 (PST)

>From darcy Wed Feb  2 23:48:01 2000
Subject: Re: Parameterized types versus high-performance Java
To: [email-masked] (C. van Reeuwijk)
Date: Wed, 2 Feb 2000 23:48:01 -0800 (PST)
In-Reply-To: <[email-masked]> from "C. van Reeuwijk" at Feb 02, 2000 06:10:20 PM
X-Mailer: ELM [version 2.5 PL0]
Content-Length: 3151      

Howdy.

> As you probably know, there is discussion in the Java community about
> adding generic types to Java in one form or another. There have been
> several papers that propose such a feature, and there has been some
> talk from Sun that they are interested in adding it.

Nearly every major programming language conference over the last two
or three years has had such a proposal.  Certainly there has been a
lot of work on this topic, at least some of it by very experienced and
well-regarded people in the programming language community.

> What you perhaps don't know is that things have progressed quite a bit
> beyond that. First, there has been an official proposal through the
> `community process' to add this feature, see
> 
> <http://java.sun.com/aboutJava/communityprocess/jsr/jsr_014_gener.html>
> 
> Note that the author of that proposal is Gilad Bracha, who works as
> 'Computational Theologist' at Sun Microsystems. See

While Gilad is the technical contact for the JSR, he is not the sole
author of the language extension.  From the GJ home page,

http://www.cs.bell-labs.com/who/wadler/pizza/gj/index.html

"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. Although JavaSoft
employees contributed to its design, GJ is not a product of JavaSoft
or Sun Microsystems and neither JavaSoft nor Sun Microsystems makes
any claims regarding it."

GJ is a refinement of an earlier proposal called Pizza,
http://www.cs.bell-labs.com/who/wadler/pizza/index.html

While visiting Bell Labs at the start of 1999, I spoke to Wadler about
various topics.  When comparing Pizza to GJ, he said Pizza was the
"100%" solution to the problem while GJ was the "95%" solution.  Pizza
includes support for parameterizing primitive types, but involves a
much larger change to the language and would therefore be
proportionally less likely to be adopted.

> Recently I've learned that things have progressed beyond that. There
> has been an article in Dr Dobbs:

> I am worried by these developments, because I don't think GJ is a very
> suitable language extension for high-performance Java, for the following
> reasons:

While perhaps not immediately meeting the needs of Java Grande, I
think the adoption of GJ via the Java community process could be a
good precedent for Java Grande -- it would be a significant change to
the language brought about by the JCP, perhaps the first of many.

Perhaps GJ combined with value/lightweight classes and operator
overloading (and a hefty dose of magic compiler dust) would go a long
ways toward meeting the program structuring desires of Java Grande.

The JCP is not a very speedy process.  Even if Java Grande had all our
detailed proposals done (which he don't) it would still be a minimum
of, say, a year, before the changes made their way into a Java release
shipped by Sun.  Therefore, there is plenty of time for us to examine
the GJ extensions and adopt our proposals accordingly, perhaps
suggesting further changes to generic support.

-Joe Darcy
[email-masked]