JSR 335 Lambda Specification, 0.6.0

Dan Smith daniel.smith at oracle.com
Fri Dec 7 20:42:53 PST 2012

Attached is the 0.6.0 revision of the Lambda spec.  I'm collecting feedback for a week or two, and then will push a revision out for public review.



Change notes:

Overall: Split Part F into Part F, Overload Resolution and Part G, Type Inference. Split the old Part G into Part H, Default Methods and Part J, Java Virtual Machine.

Functional Interfaces: Defined intersections as a kind of functional interface type. Defined the descriptor of wildcard-parameterized types. Added the annotation.

Lambda Expressions: Added the _ keyword and the -> operator to the grammar.

Method References: Added qualified super references. Added array constructor references. Added the :: separator to the grammar.

Poly Expressions: Allowed casts to intersection types. Refined the conditions under which a method invocation is considered a poly expression. Introduced rules for classifying and typing conditional expressions.

Typing and Evaluation: Refined the presentation of inference of wildcard-parameterized type instantiations. Allowed arbitrary statement expressions in lambda bodies targeting a void return. Always interpret lambda returns in an assignment context. Defined runtime behavior when targeting an intersection functional interface type. Eliminated support for unbound inner class constructor references. Added support for qualified super references and array constructor references. Restricted supported forms of static method references.

Overload Resolution: Defined potentially applicable for methods with functional interface parameter types targeted by lambda expressions. Revised most specific method analysis to consider the invocation argument expressions, compare descriptors of functional interface types, and minimize boxing/unboxing.

Type Inference: Added a stub for most specific method inference.

Default Methods: Modified syntax, treating default as a method modifier. Added support for static interface methods. Refined the inheritance rules for default and abstract methods. Enclosing instances of inner classes can be interfaces. Added support for the package access modifier.


Major things left until the next spec iteration:
- Spec for inference enhancements
- Refine JVM resolution rules; specify 'invokespecial' and 'invokestatic'
- Spec for JVM bridge methods


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/lambda-spec-experts/attachments/20121207/efec59e1/jsr335-0.6.0-0001.html 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/lambda-spec-experts/attachments/20121207/efec59e1/jsr335-0.6.0-diff-0001.html 

More information about the lambda-spec-experts mailing list