Summary of Closure Proposals for Java 7

Howard Lovatt has a good summary of the various proposed approaches to include the ability to support closures in Java, including his own proposal as well.

Closures are supported in many other languages like Ruby, Python, Lisp and Perl, and allow the developer to define a block of code and refer to that block of code with a reference. This allows the reference to the block to be passed as a parameter and to be applied to other code, for example to all matching items within a loop.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.