jsr341-experts@el-spec.java.net

[jsr341-experts] Status on lambda expression and query operators

From: Kin-man Chung <kinman.chung_at_oracle.com>
Date: Fri, 28 Oct 2011 13:43:28 -0700

I've been quiet the last couple of weeks because I've been busy
implementing the lambda expression and the query operators in the RI.
At the same time, I've been refining the spec on these features.

Lambda Expression

   * Allow #{...} but not ${...}. I think ${...} has been associated
with immediate evaluation (JSP), so is not appropriate for Lambda.
   * Disallow nesting of lambda.
   * Add couple of methods in ELContext and a new class
javax.el.LambdaExpression.

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

Collection Constructors

   * I use "->" for maps, such as {"key" -> value}, because "=" would
cause ambiguity (because of the assigment operator "=").

Query Operators
([http://java.net/projects/el-spec/pages/CollectionOperations)

   * Since the implementation for these operators can be complicated,
and to allow rooms for optimizations, I added a method in the
ExpressionFactory to retrieve an implementation. I thinks we should
make this an optional part of the spec.
   * The source and return object for the operators is now an
Iterable<Object> instead of the actual collection instances. This can
improve performance because construction of collection objects can be
avoided most of the times, especially in the case of cascading operators.

I got "where" and "select" to work in the RI, but it is not fully tested
yet. :-)

I'll take a vacation starting Sunday, and will be back around Nov 15.
Except for the comma operator, which I think we should do, there should
be no more new features for this JSR. We'll still need to go over the
bugs/rfes list and see if we can fix some of those for the JSR.

Thanks.

Kin-man