Suggestions for Java Generics Semantics in Java Version 7.0 _ Resurrected

Florian Weimer fweimer at bfk.de
Thu Jun 18 02:34:49 PDT 2009


* Ismael Juma:

> On Thu, 2009-06-18 at 11:06 +0200, Florian Weimer wrote:
>> Obviously, this heavily constrains the solution space.  In the end,
>> Java 5 bytecode could not run on pre-Java 5 VMs, so this requirement
>> was somewhat pointless, wasn't it?
>
> Neal answered this question in a blog entry a few years ago:
>
> http://gafter.blogspot.com/2004/09/puzzling-through-erasure-answer.html 

Java's equivalent of DLL hell described in that post is very real, but
it happens all the time because most library authors lack a firm
commitment to backwards compatibility, with or without generics.

But my point was precisely that avoiding versioning hell doesn't work
with Java 5 generics because as soon as you put them in your code, you
have to compile with a generics-enabled javac, and there is no
Sun-supported way to make its output work with javac from 1.4.  As a
result, the migration to generics still hasn't happened widely.  Most
of the libraries we use still don't use generics, not even for
collections classes they use internally.

I don't know for certain what this means for the future.  It seems to
suggest that aiming for the level of binary compatibility Neal
described is just unrealistic.  There's no reason to assume that the
next iteration would be any different.

-- 
Florian Weimer                <fweimer at bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99



More information about the jdk7-dev mailing list