hg: lambda/lambda/langtools: Next round of implementation reflecting the latest 'State of the Lambda' draft; implemented features are:

Peter Levart peter.levart at marand.si
Tue Jul 27 02:37:30 PDT 2010


Hello Maurizio,

The latest 'State of the Lambda' draft mentions optional "appearance" of target SAM type just before lambda body in cases where necessary to disambiguate overloaded method resolution or where context doesn't provide (correct) target SAM type. I haven't managed to find out where to stick this optional SAM type in current prototype. Simple cast doesn't work as Alex explained. Is this implemented already?

Regards, Peter
 
On 07/23/10, maurizio.cimadamore at oracle.com wrote:
> Next round of implementation reflecting the latest 'State of the Lambda' draft; implemented features are:
> 
> *) Lambda expressions
> New syntax. The non-terminal symbol '#' is still used to introduce both lambda expressions and function types, but a bunch of improvements have been made.
> Now, the lambda body is always denoted by braces '{' '}', as in #(int x) {}. Moreover, if the argument list is empty, it can be omitted, as in #{...}.
> 
> *) SAM conversion & Target typing
> Updated to latest specification. Lambda expression are now only allowed where a target type is expected (return/assignment/method call - and, for compatibility with old prototype). The target type can be either a function type or a SAM type. The target type is used for inferring partially specified lambda types, as in #(x) { ... }.
> 


More information about the lambda-dev mailing list