First Class Methods: Java-style closures

Home page

This is the home page for the First Class Methods (FCM) closures proposal for Java 7.

The 'FCM' proposal consists of two parts - FCM and JCA. For clarity we recommend referring to the complete combined proposal as FCM+JCA.

Devoxx 2009 announcement

At Devoxx 2009, Sun announced that they will pursue closures for JDK 7, and the starting point is much of the syntax and semantics of FCM v0.5 (inner methods and method types). Note that the details are all still up for grabs. Also note that the ideas from JCA (control statements) is specifically excluded from JDK 7, as is non-local returns.

First Class Methods

This is a proposal to enhance the Java language, allowing full compile-time type-safe access to methods, fields and constructors. In addition it provides closures in a form that feels natural to anyone who has ever coded an inner class.

Further examples and discussion can be found on Stephen Colebourne's blog.

Stephen Colebourne, UK

Stefan Schulz, Germany

Java Control Abstraction

This is a statement proposing to enhance the Java language with library defined control abstraction. This is an extension of the FCM proposal.