Suggestions for Java Generics Semantics in Java Version 7.0 _ Resurrected

Alex Buckley Alex.Buckley at Sun.COM
Wed Jun 17 12:21:40 PDT 2009


1) Sun's bug database categorizes an entry as either a defect or a 
request for enhancement. Bug 5098163 is, rightly, a request for 
enhancement. It is not a defect that type erasure exists. I will say 
that again. Type erasure is not a bug. It is a feature.

2) The reason it is a feature is that many experts - including but not 
limited to Philip Wadler, Martin Odersky, Gilad Bracha, Joshua Bloch, 
and Neal Gafter - worked for many years on crafting a generic type 
system that allowed people to migrate their non-generic clients and 
libraries smoothly. Reified generics would have made that migration more 
complex. If you don't know why, find out.

3) While there were good reasons for avoiding it, there is no doubt that 
reified generics make the Java language itself more regular. No doubt at 
all. The question we face TODAY is, are reified generics MORE valuable 
than other features that Sun can add to the Java platform. Evidently 
not, since Sun is working on other features.

Again, I don't want to prolong this conversation, but perhaps you could 
say which JDK7 feature(s) you would drop to make room for reified 
generics? You can choose from the list at 
http://openjdk.java.net/projects/jdk7/features/

Alex



More information about the jdk7-dev mailing list