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

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 Comments

  1. Posted May 29, 2003 at 1:44 pm | Permalink

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

  2. Neal Gafter
    Posted June 26, 2003 at 7:02 am | Permalink

    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. Posted June 26, 2003 at 7:03 am | Permalink

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

  4. Posted June 26, 2003 at 8:57 am | Permalink

    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
    Posted December 5, 2005 at 9:20 pm | Permalink

    thanx

Post a Comment

Your email is never shared. Required fields are marked *

*
*