New JDK1.5 early-access compiler, and “variance” in Generics

# 2003-05-29 16:26:05 -0400 | Java | 5 Comments

Just spotted the new JDK1.5 early-access compiler.

This release adds support for the new JSR201 features (new “for each” loop, autoboxing, etc.).

It also adds experimental “variance” support to Generics (this is not part of JSR14, it’s just an experiment). Adding variance support to Generics solves some nitty-gritty annoyances in JSR14… but oh boy… if you thought Generics was complicated to begin with then this will blow your mind!

If you want a quick run-down, read the “variance-overview.pdf” presentation contained in the early-access download. I’ll digest it some more and add some comments in the coming days.

5 Responses to this entry:

  1. Oliver Burn Says:

    Mate, if you this this variance feature is complicated, I want it removed immediately!

  2. Neal Gafter Says:

    Variance is not going in to Tiger. See the evaluation
    in http://developer.java.sun.com/developer/bugParade/bugs/4856545.html
    for what we expect to do instead.

  3. Neal Gafter Says:

    That link should be
    http://developer.java.sun.com/developer/bugParade/bugs/4856545.html

  4. Mats Henricson Says:

    The more I read about the generics proposal for Java, the less I like it. What I see is a repeat of the C++ mess, where a seemingly simple addition to the laguage ends up being a pandoras box full of worms. And the benefits are almost non-existent! The type-safety argument is a red herring! I have almost never ever seen a bug caused by an orange in the apple basket!

  5. cpt Says:

    thanx

Leave a Reply

Click here to leave a reply