This is a weekly update on new Java 7 information. All current and previous information is maintained on my Java 7 page. This one’s going out a little late as I got sucked into “Lost” tonight. Do they really need to add yet another character to this show?
Java Modularity (JSR 277, 294)
Rob Yates had an interesting post this week on the difference between the JVM and CLI approach to compilation. Specifically, how does the CLI differ from having a static module system from the start as opposed to the JVM’s more open dynamic classloader system. Seems like the changes in JSR 294/277 might create a world where you could get the benefits of both.
NIO 2 (JSR 203)
Alan Bateman announced the release of the Java NIO 2 draft spec. NIO2 covers a lot of ground – probably the biggest item is a new API for file systems, which seems pretty interesting. I’d be particularly interested in having a virtual file system that I could use during unit testing without actual needing to write to the real file system. There are also other features like multicast support, “big” buffers with support for numbers of items greater than the int range, and asynchronous channels.
Elliotte Rusty Harold responded favorably but did point out that some of the items like the “big” buffers really could have been put into the JDK in a more agile way instead of waiting for the long timeframe of a major JDK release.
More info: JSR 203
Short instance creation
Elliotte also chimed in on whether type inference is a bad idea for Java. I originally thought that type inference would be pretty nice but my thinking has changed quite a bit after seeing various proposals and at this point I’m not sure it’s worth the complexity or effort. Java is strongly typed and that’s ok. It’s not really that much effort to type your variables and I can’t say I like either the syntax or the consequences of most of the proposals, particularly in light of the additional complexity from generics.
More info: Short instance creation
There were a couple good analyses this week in the closure arena. Howard Lovatt compared some closure proposals and Cay Horstmann wrote on the differences in return semantics in BGGA and CICE closures.
In other news, Neal Gafter (co-author of the BGGA closure proposal) visited Cay Horstmann’s class at San Jose State where they have been examining the various closure proposals. Lots of good discussion in the comments, so check that out.
More info: Closures
Steve Goldman posted some more info on the state of tiered compilation.
More info: Tiered Compilation