Skip to main content

Stephen Colebourne: Update on Closures in JDK 7

Posted by editor on November 24, 2009 at 5:23 AM PST

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:

  • CICE - "Concise Instance Creation Expressions" by Bob Lee, Doug Lea, and Josh Bloch
  • BGGA 0.5 - "Closures for the Java Programming Language" by Gilad Bracha, Neal Gafter, James Gosling, Peter von der Ahé
  • FCM 0.5 - "First-class methods: Java-style closures" by Stephen Colebourne and Stefan Schulz
  • CFJ 0.6a - "Closures for Java (v0.6a)" by Neal Gaffer

For each closure characteristic, Stephen shows which proposals indicate support for that aspect of closures. The final column of the table assesses whether support for each characteristic was suggested by Mark's announcement at Devoxx.

If you've been following the JDK 7 closures news, you'll want to read Stephen's More detail on Closures in JDK 7. It provides insight into the present course of events for closures in the upcoming JDK 7 (including what's known and what's still to be determined), while also pointing you to original documents that have been key in the ongoing debate and discussion regarding closures in Java.


In Java Today, Toni Epple invites people to Come to Zurich!:

I’m still alive although I’m not blogging much recently. It’s just because there’s so much happening in the NetBeans Universe. Thanks a lot to everyone voting for me as a member of the NetBeans Governance Board! If you happen to be in munich, visit me in my new office (Bergmannstr. 66) for the party in December (exact date has to be decided). Just came back from Devoxx on saturday where I had a great time hanging out with Geertjan, Aaron “This is” Houston, Sven Reimers, Florian Vogler and Martin Klähn. Geertjan and my session on Lookup and OSGi was nice (here’s a picture) and I met a lot of OSGi fans. It’s not so different from the NB Module system after all (but we were there first :-) ). Also learned about Apache Ace. This is really cool technology...

George Lawton speculates on Hard times for JavaFX?:

Sun has long touted JavaFX as a tool to provide interactivity to a wealth of platforms. It was introduced at a time when Windows Mobile was considered the interactive platform to compete against. But since then a number of credible alternatives have surfaced and Sun has made little traction. Anglin suggests that the adoption of Flash for the Blackberry might just spell the end of JavaFX...

Stephen Colebourne provides More detail on Closures in JDK 7:

This blog goes into a little more detail about the closures announcement at Devoxx and subsequent information that has become apparent. At Devoxx 2009, Mark Reinhold from Sun announced that it was time for closures in Java. This was a big surprise to everyone, and there was a bit of a vacuum as to what was announced. Firstly, 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 today's Weblogs, Wolfgang Zitselsberger presents Synthetica BlackEye Highlights:

Synthetica V2.9 (Swing Look and Feel) comes along with a new theme called Synthetica BlackEye Look and Feel. Below you'll find a short summary of the most important highlights.

  • Support of round rectangle window shapes - The BlackEye theme uses a round rectangle as window shape. As you maybe know you can do similar things by translucent window support since V2.8. However because translucency can affect performance (will be improved in Java 6u18) the default setting in BlackEye makes use of shape support which was introduced with Java6u10...

Harold Carr provided his Kynetx Impact Conference - notes - morning day 2:

9:00-9:45 am
User-Centric Identity in the Client-Side Revolution
Kim Cameron
Microsoft Chief Architect of Identity, Distinguished Engineer

Identity
- the stuff of poets and philosophers

Digital Identity
- Recognize us in different contexts
- foundation for personalization
- need to traverse silos
- need for contextual separation
- each person has mosaic of identities

Architectural problem
- internet was not designed with any way to know who you're connected to...

Fabrizio Giudici recently provided an update on Spinning JXMapViewer and related stuff out of SwingX-WS:

While SwingX is going on steadily (1.6 has been recently released), things are pretty quiet for SwingX-WS. I've just recently patched it in order to make it compatible with the latest 1.6 and I'm fine with it, but I think that it's important that it is taken care consistently. From what I can understand, the SwingLabs guys are focusing on SwingX and little time remains for SwingX-WS.

Also, SwingX-WS probably was born with a broader scope (collecting several stuff generically aimed at using a few common, public web services from Swing), while AFAIK most people now use it for JXMapViewer. I see a rather high interest in it...


In the Forums, osbald asks about Customising forms for multiple uses: "Hi all just after a sanity check on another idea. Today I need to customise a dialog for two different contexts (viewing and editing). What I was thinking of doing was creating the dialog with default view-only actions installed (all registered in the..."

mr_light wonders about Streaming(posible complete push towards client): "What is to way to go / how to setup your service so that one avoids buffing the response/message as a whole? I'm looking for the same paradigm as is typically encountered with servlets:

public void accept(Request request, Response..."

guy_penda is looking for information on image/icon support for Form title and TextArea: "Hi everybody! I want to customize the title of my form but I don't know if there a way to use an image instead of a text for the title of a Lwuit Form. Also I am using TextArea with setUIID("Label") to have multinline Label. But is there any support for..."


In our current Spotlight, Terrence Barr invites us to Check out Java Card 3.0 Connected Edition: Real Java, just really flat ;-): "Java Card 3.0 was released a couple of months ago – and the second update (version 3.0.2) is scheduled for December. If you haven’t paid much attention to Java on smart cards because you thought it’s not “real” Java – well, look again. It’s true that Java Card 2 was very limited in many ways – a testament to the kind of technology you had available on smart cards 10 years ago. There are billions of these out there today..."


The new java.net Poll asks What do you think about closures in JDK 7? The poll will run through Thursday.


Our Feature Articles lead off with Sanjay Dasgupta's in-depth article Simplify Native Code Access with JNA. We're also featuring Eric Siegelberg's Using a Service Delegate to Avoid MVC Controller Bloat, which describes how to maintain separation of concerns and avoid MVC controller bloat through the use of service delegates. And, our latest Java Tech guest column is Marina Kamahele's "Transparent" Panel - Mixing Heavyweight and Lightweight Components.


The latest Java Mobility Podcast is Java Mobile Podcast 90: Augmented Reality: Excerpts from the JavaOne 2009 Augmented Reality session with Kenneth Andersson and Erik Hellman of Sony Ericsson.


Current and upcoming Java Events:

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.

-- Kevin Farnham

O'Reilly Media

Related Topics >>