Stephen Colebourne: Update on Closures in JDK 7
In Java Today, we highlight Stephen Colebourne's new blog post, More detail on Closures in JDK 7. In this informative post, Stephen talks about the announcement by Sun's Mark Reinhold at Devoxx last week (closures will be included in JDK 7) and "subsequent information that has become apparent."
Stephen speaks with authority on this topic, as he is co-author of one of the major Java closures proposals, "First=class methods: Java-style closures" (aka FCM). He notes that that the announcement "was a big surprise to everyone, and there was a bit of a vacuum as to what was announced." Still, the announcement showed that:
Sun, via Mark, have chosen to accept the basic case for including closures in Java. By doing so, the debate now changes from whether to go ahead, to how to proceed. This is an important step.
In Stephen's view, the big questions now relate to what's in and what's out. There have been multiple proposals on how closures could be implemented in Java, with differing proposed closure syntax. Assessing Mark's presentation and other information he's gathered since Mark's announcement, Stephen came up with a table that lists 13 fundamental characteristics of closures that have been specified in varying degrees of completeness in four major closure proposals: