Java Generics: Let The Other Shoe Drop
(Via the original GJ: Generic Java page)
Guy Steele on GJ: GJ is an excellent design and implementation for adding generic types to the Java programming language. It provides a workable and practical facility for the immediate future that can solve many of today's problems in programming and debugging. In the long term,
I would hope to see it compatibly extended to carry run-time type parameter information in the manner that Robert Cartwright and I have proposed; but even if that does not occur, GJ as it is currently designed is a useful and workable tool that deserves widespread study and use.—Guy Steele (quoted from e-mail, with permission)
My recent reading of the O'Reilly book Java Generics and Collections convinced me that Java generics is too much trouble for too little gain for the average Java developer like me.
Eric commented "This is too hard. Sigh." And I agree. And in my frustration I posted a comment to the Java.net poll on What one feature would you most like to see in JDK 7?:
Me: My biggest wish for a future version of Java, not necessarily Java 7, is to have the other half of Java generics (runtime support for generic types) implemented, thus removing the need for erasure.
I believe I'm not alone in this desire.
Thinking that what I hoped might be just a common Java language user's fantasy that is not doable in reality, I did some search on The Google on the topic. And what did I find?:
- That it's not a mere fantasy of a mere language user
- That a run-time type parameter information proposal has been on the table since 1998
- That one of its authors is none other than Guy L Steele, Jr.
I couldn't read the proposal but I did find the quote at the beginning of this post.
So I believe I'm standing on very firm ground when I yell:
ERASE ERASURE