Wednesday, May 02, 2007

Great summary of possible Java 7 features

This is a great summary including source code examples of ideas for Java 7 (now in development): Java 7 and Beyond

There are a lot of nice suggested features for the future, but as always hard to pick among them. There is wisdom in delaying some things until they mature for example, however boring that might be. Other things are sort of nice, but are they really that valuable? Then again some things would be great to have (the small Swing application framework will be nice).

Array collection syntax might not be needed that much but it is a nice touch I think and makes for less/easier typing with just some compiler magic. Type inference looks nice, but lock you to the concrete class (in the example given there it will be typed as a HashMap and not a Map), still seems worth it to me.

Annotations on Java Types seem rather useful, but ouch it looks ugly with all those annotations
all over the place. Hmm have to think about that one. Validation, JSR 303, also looks like a great idea, maybe combine it with the properties stuff, but xml-based... hmm. Maybe annotations instead. Oh, even more annotations. Hmm.

Closures, as long as they pick a version which is easy and intuitive to read (you only write once, but it is read often) I'm all for it, perfect for some things. A new time and date API, well it IS needed, third time is the charm? A Unit API certainly looks great and appeals to me as an engineer, but is it really needed? Filesystems API stuff, sure, that stuff is really needed in a modern programming language.

Invoke dynamic? Absolutely! One of the most valuble things with java is not the language but the virtual machine. Sun's Hotspot for example is really amazing. Should really try hard to be able to use it to its full extent in other related projects, such as JRuby.

A very non-sexy thing is the jar-versioning/packet management stuff but as more and more programming is about changing or extending current programs, this is really needed.

I reserve the right to change my opinions on this stuff at any time :)