Pure Danger Tech


Java 7 Roundup (May 30th)

30 May 2007

This is a weekly update on new Java 7 information. All current and previous information is maintained on my Java 7 page.

General Discussion

Hang on to your hats people, this is a big roundup!

Neal Gafter posted an interesting (and controversy-generating) post about removing language features, specifically checked exceptions as one option that could simplify the closure specification. Some followups: Ricky Clarkson, Elliotte Rusty Harold, InfoQ. I’ve certainly been back and forth through the full pendulum of checked / non-checked exceptions, and I’m currently more on the non-checked side, but I still feel that checked exceptions are a worthwhile technique for API design, when used appropriately. I also think there is a very large pool of existing Java programmers that would freak out if we stopped checking them.

You might also be interested in the lengthy post by Joe Darcy on all the things you need to consider when adding a new Java 7 language feature. Required reading if you’re interested in doing some language hacking or starting a new JSR to add curse words to the syntax (although they’ve already turned my JSR down three times, so good luck with that).

I also ran across a link (via Scott Rosenberg’s blog) to an older paper from Guy Steele on language design and his thoughts on how to grow Java that is pretty interesting in light of all the current Java 7 discussion. If you’re interested in language design, I would highly recommend it as an interesting and very well-written paper. The issues of the day for Guy were really operator overloading and generics. It feels like we are examining the same kinds of issues today with closures and some of the other language proposals (like say, removing checked exceptions :). Closures to me feels like one of those language changes that allows us (the Java-using community) to grow the language ourself. It’s also a heck of a lot of power – more than enough to blow off your own foot.

The JavaOne slides have been posted and here are a set that relate to Java 7 that you might find interesting. There are, of course, many interesting talks beyond this set, so check out the full set. They are still adding multimedia for many of them as well.


Recently Andreas Sterbenz posted a restatement of what superpackages are. He followed that up this week with a restatement of nested superpackages.

Andreas also posted that the OpenJDK project for Java Modules is just about setup and we should start seeing some code and other useful stuff up there soon. So, if you’re interested in Java modules, check out the JSR 277 and JSR 294 mailing lists and watch the OpenJDK project.

In somewhat related news, JSR 291 (OSGI) passed with a couple no votes recently and you can read comments from Ed Burnette, and Peter Krien if you’re interested.

Glyn Normington posted an article examining how JSR 277 could be reworked to provide interoperability with JSR 291. Definitely good to see this happening now rather than later. Peter Krien also posted some thoughts about how these various modularity systems could actually play together to get the best of the combination.

More info: JSR 277, JSR 294


Check out this interview with Alan Bateman on NIO 2 for a bunch of good info.

Lots of activity on the JSR 310 Date and Time API mailing list recently. There’s been an active discussion about whether time zones are in scope (consensus seems to be yes), whether a new class is needed (also seems to be yes), and how the new class would differ from the existing classes. Certainly, the mutability of the existing TimeZone classes will be addressed, as well as of updating timezone information, possibly even hot-swapping without restarting the JVM.

Also, in other exciting library news, it appears that the JSR 107 JCache expert group was revived at JavaOne this year and Greg Luck posted that they are actively working on a new spec. Their mailing list hosted at the java.net project is open to observe if you want to stay informed. Currently, they have no SE or EE target, but it seems theoretically conceivable that some caching API could make it in for Java 7, so I’ve added a new JSR 107 section to the Java 7 page.

More info: JSR 203, JSR 310, JSR 107


Hans Muller’s talk at BeJUG on JSR 296 was posted.

More info: JSR 296


Eamonn McManus posted a couple articles on JMX 2.0, specifically on cascading (federation) and custom MXBeans.

More info: JSR 255, JSR 262

Generics and Types

Howard Lovatt posted a great exploration of Super Type Tokens.

Eugene Kuleshov posted an article on a use for JSR 308 annotations that targets concurrency and performance in multi-core systems.

More info: Type Literals, JSR 308

Language Proposals

Howard Lovatt also posted another good comparison of scoping across the various closure proposals. And possibly interesting and related is a post by Curtis Poe on closures and Sapir-Whorf, basically how the use of closures changes the way you program, so it’s hard to see why you need them till you’re used to having them. I mentioned Sapir-Whorf on this blog a ways back related to an interview with Matz on Ruby.

Matthias Ernst posted a proposal on allowing cascading of void functions. In other words, calling a method on an object that returns void would effectively automatically return the object, allowing you to then continue calling methods on the same object. This is pretty cool and would make the creation and use of fluent APIs a lot easier. Matthias followed up with a patch so you can try it out yourself.

Fred posted some ideas around the need for an abstract enum.

More info: Closures, miscellaneous language ideas

That’s it for this week…stay tuned.