users@el-spec.java.net

[el-spec users] [jsr341-experts] Lambda expression syntax

From: Kin-man Chung <kinman.chung_at_oracle.com>
Date: Tue, 13 Dec 2011 17:57:18 -0800

Now that JSR 335
http://jcp.org/aboutJava/communityprocess/edr/jsr335/index.html has
released an early draft review, the syntax for lambda in JDK 8 has
settled down. Accordingly, I have also changed our syntax for lambda
expressions in EL, to match that in the edr. See

     http://java.net/projects/el-spec/pages/LambdaExpression

The new syntax seems cleaner. However I do have to give up the comma
operator I was thinking of adding to EL 3.0, because the comma
expression, such as (x,y), would cause an ambiguity with the parameters
for the lambda expression, such as (x,y)->x+y

I've also update the implementation to use the new syntax for collection
construction and lambda expression. It builds, but is not not tested.

I've filled up the LINQ wiki
http://java.net/projects/el-spec/pages/CollectionOperations with
definitions of some more operators. Implementing the operators is not
too hard, but there are a lot of them! It is actually quite
interesting, and I encourage you to come and take a look, especially
since some of you may have to do it later. :-)

Kin-man