Thursday, September 8, 2011

Java Lambda Syntax Announced

Brian Goetz's OpenJDK message Syntax Decision (on the lambda-dev mailing list) provides the "(mostly)" decided syntax for Java lambda expressions. Goetz caveats this announcement ["We may still deliberate further on the fine points (e.g., thin arrow vs fat arrow, special nilary form, etc), and have not yet come to a decision on method reference syntax"] before providing some examples of how the C#/Scala-inspired syntax would look.

Goetz states reasons for selecting the syntax such as doing well by "subjective measures" and Java being similar to the syntax of two highly related (syntactically) languages (C# and Scala) in the absence of a clearly preferred syntax choice.

Other interesting resources related to Java and the long road to lambda support include First Version of Java Lambda Syntax Sparks Debate, Lambdas in Java: An In-Depth Analysis, Understanding the closures debate, and Project Lambda: Straw-Man Proposal.

1 comment:

0x1e said...
This comment has been removed by the author.