InfoQ

News

Java Closure Proposals Compared, JCA Position Paper Announced

Posted by Rob Thornton on Apr 13, 2007 02:15 PM

Community
Java
Topics
JCP Standards,
Programming
Tags
Closures

Howard Lovatt, the author of the C3S proposal for closures in Java, has written a detailed comparison of the four best known proposals (C3S, FCM, CICE, and BGGA). At the same time the authors of the FCM proposal have released a new position paper building on FCM for control abstraction. Ricky Clarkson thinks that CICE is insufficient and wonders if internal politics at Google are affecting it.

Lovatt walks through the four proposals and compares each in terms of eleven features:

  1. Short syntax for the creation of an instance of an inner class/closure
  2. Access to both this pointers and methods within an inner class
  3. More than one method in an inner class/closure instance
  4. Implementation of methods defined in classes
  5. Type inference
  6. Method, constructor, and field literals
  7. Short syntax (particularly for control structures and short methods)
  8. Assignment to local variables and no final requirement
  9. Variable number of exceptions
  10. Method/function types (with shorter syntax)
  11. Non-local, return, break, and continue

His goal in writing is to separate out the inner class / closure part of the proposal from any other extras that might come with it. On the heels of this comparison, Stephen Colebourne, Stefan Schulz, and Ricky Clarkson have built upon FCM with a position paper (they clarify that it is not a proposal and thus not complete) for Java Control Abstraction. They motivate the need for JCA because there are places closures are not applicable. Such a place is where an API exists that is used very similarly to a built in keyword.

Lastly, Ricky Clarkson wonders if politics at Google have affected the advancement of BGGA proposal. There are restrictions on who is able to contribute to the JCP, specifically if your employer is a member, you cannot be. Clarkson suggests that Josh Bloch, Google's contact on the JCP, may be uninterested in creating a JSR for as he has already proposed CICE. Bob Lee, one of the co-authors of CICE responds to Clarkson saying this is an unfair suggestion and that there is no rush to get closures into Java.

1 comment

Reply

Clarkson by Ricky Clarkson Posted Apr 13, 2007 4:06 PM
  1. Back to top

    Clarkson

    Apr 13, 2007 4:06 PM by Ricky Clarkson

    That's the first time I've been called Clarkson since school. Josh Bloch recently replied to a blog post somewhere to remind us of his solution to many of the use cases that CICE alone misses out on - http://docs.google.com/View?docid=dffxznxr_1nmsqkz - I still think with CICE and ARM blocks he's likely to miss some use cases, but I haven't identified any yet. Cheers.

Exclusive Content

Agile in Practice: What Is Actually Going On Out There?

Scott Ambler talks about actual data resulting from surveys made during 2006-2008, showing how Agile is perceived and implemented within organizations.

Building Smart Windows Applications

From QCon 2008, Daniel Moth presents on using Visual Studio 2008 and .NET 3.5 to create compelling rich Windows applications.

Joshua Kerievsky about Industrial XP

Joshua Kerievsky, founder of Industrial Logic, talks about Industrial Extreme Programming which extends XP by including practices dealing with management, customers and developers.

Jeff Barr Discusses Amazon Web Services

Amazon Web Services (AWS) Evangelist Jeff Barr discusses SimpleDB, S3, EC2, SQS, cloud computing, how different Amazon services interact, origins of AWS, AWS globalization and the March AWS outage.

More Than Just Spin (Up) : Virtualization for the Enterprise and SaaS

Cloud services have helped bring virtualization to the forefront. Its full power however, also includes other benefits such as high availability, disaster recovery, and rapid provisioning.

Ruby Beyond Rails

John Lam talks about his path to dynamic languages, some of the problems of making IronRuby run fast, and how the DLR helps with implementing languages.

VMware Infrastructure 3 Book Excerpt and Author Interview

VMware Infrastructure 3: Advanced Technical Design Guide and Advanced Operations Guide provides a wealth of practical insights into setting up virtualization in todays corporate environments.

Architectures of extraordinarily large, self-sustaining systems

Can a system that is so large it cannot be comprehended be "designed" in a conventional sense? The foundations of computing are about to change. In this talk, Richard P. Gabriel explores why and how.