Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4173702
Votes 20
Synopsis Parameterized classes
Category java:compiler
Reported Against 1.2beta4
Release Fixed
State 11-Closed, duplicate of 4064105, request for enhancement
Priority: 4-Low
Related Bugs 4172216 , 4175377 , 4064105
Submit Date 15-SEP-1998
Description
NOTE: this bug has been closed as a duplicate of 4064105.  If you
wish to vote for this issue in JDC, please vote for 4064105 instead.





*Description:

We know that JavaSoft have a working implementation of templatized
classes for Java. It uses the pervasive dynamic type information
in Java to avoid many of the problems associated with templates
in C++. This would be a very useful feature because it would make
code that used collections much easier to write. Quite a few people
in  xxxxx  are very interested in this feature, and would like to see
it finished in time for JDK1.3.
======================================================================
Work Around
N/A
Evaluation
   I believe that a clean, simple parameterized typing facility (along the
lines of http://www.cs.bell-labs.com/who/wadler/pizza/gj/index.html )
would represent a fine addition to the language, especially when combined with
the 1.2 collections facility.

  xxxxx@xxxxx   1998-09-16


Parameterization can indeed be very useful.  In considering the various
proposals, we are particularly concerned about the impact of such a
large change on our customers, especially with respect to compatibility
and stability.

The investigation of our options is ongoing.

  xxxxx@xxxxx   1998-09-16
Comments
  
  Include a link with my name & email   

Submitted On 06-NOV-1998
ejfried
GJ rocks, and I'd love to see this be an official
part of Java.


Submitted On 23-NOV-1998
cdailey
Perhaps it's too late for Java 1.2, but I believe
this one feature adds tremendous value to the
language with minimal threat and no real loss of
consistency or simplicity.  Perhaps 1.2.1?


Submitted On 23-NOV-1998
alexrios
Even though it would dificult to retrofit the current Java platform to use
parametrized types, they should be made available ...
I do not recommend changing current API's ...
No attempt should be made to force:
Vector<String> to be a subclass of Vector<Object>
or Vector<Object> to be the same as Vector ...
This would be too much to handle, many developers
would waste alot of time recoding their routines ...
JDK 1.2 collections could be changed ...Uh Oh too late


Submitted On 23-NOV-1998
drwillhoit
Adding parameterized types would enhance both the
compile time safety of the language and would
speed coding.  Java is sorely in need of this.


Submitted On 03-DEC-1998
danmil
This is my single most-desired feature for Java.  It makes
code easier to write, easier to statically check, and
easier to read.  Once you start to sling around Hashtables
of Strings to Hashtables, you really, really want
to be able to specify it as:
Hashtable<String,Hashtable<String,String>>
rather than hoping that it will all just work out.
And the GJ approach (via erasure, to ensure compatability 
with old code/libraries), seems to be a win all
around.


Submitted On 04-DEC-1998
AntonyBlakey
The flip side of this would be unboxing in
type-constrained containers which would be
a big win for primitive types 
(ie. no more wrappers), and other specialisations
on the basis of type.


Submitted On 07-DEC-1998
chettih
In reality, I haven't tried to generate the bug.
I like gj and found it useful. I would like to
see it (or a form of template) in the next Java jdk.
Thanks!


Submitted On 29-DEC-1998
Jakstepper
definitely missing, but maybe the VisualJ++ guys 
are faster



PLEASE NOTE: JDK6 is formerly known as Project Mustang