We have proposed to add Closures to the Java Programming Language. Closures simplify the use of APIs that rely on the use of anonymous class instances, such as the concurrency APIs and callbacks. More importantly, closures support control abstractions, which are APIs that act as programmer-defined control constructs.
This JavaPolis talk describes the proposed language extension and its design rationale, and shows how it will affect existing and future APIs.
Neal Gafter is a software engineer and Java evangelist at Google. He was previously a senior staff engineer at Sun Microsystems, where he designed and implemented the Java language features in releases 1.4 through 5.0. Neal is coauthor of "Java Puzzlers: Traps, Pitfalls, and Corner Cases" (Addison Wesley, 2005). He was a member of the C++ Standards Committee and led the development of C and C++ compilers at Sun Microsystems, Microtec Research, and Texas Instruments. He holds a Ph.D. in computer science from the University of Rochester.
Scala— Scala is a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages. It is also fully interoperable with Java.
Closures Questions with Joshua Bloch— A very interesting JavaPolis Q&A session with Joshua Bloch on closures and other Java related topics. From 'Is there an impedance mis-match with Java and the BGGA proposal?' to 'Was the wildcard feature tried out thoroughly enough?' and 'What is your job at Google?'... enjoy the ride!
The Closures Controversy— Last year Neal Gafter premiered his BGGA Closures proposal at JavaPolis. One year later Joshua Bloch presented his view on the Closures Controversy and why he feels that CICE is a more suitable approach. One way to look at the available proposals is to consider the impact on Java as a language: whether it's possible to undergo fundamental change while still preserving the 'Feel of Java'.
An update on Java Closures— Closures simplify the use of APIs that rely on the use of anonymous class instances, such as the concurrency APIs and callbacks. More importantly, closures support control abstractions, which are APIs that act as programmer-defined control constructs. This 2nd closures talk includes some new ideas on the subject.