transparent lambda
Neal Gafter
neal at gafter.com
Thu Jan 7 16:55:15 PST 2010
On Thu, Jan 7, 2010 at 4:10 PM, Peter Levart <peter.levart at gmail.com> wrote:
> I would not put labeled block expression in the list of possible
> StatementExpressions.
>
> So the only syntactically correct interpretation of the above example would be "a labeled block statement followed by an empty statement".
>
> Am I missing something?
>
> Peter
>
Yes. Can an expression statement *start* with a labeled expression?
label : { ... }
(expression) . f ();
Is the parenthesized expression an argument to the labeled block expression
(which must be of function type), or the start of a new statement?
We can go on and on here, but the fundamental point is: it is a bad idea to
have a single syntax be ambiguous between a statement form and an expression
form.
Cheers,
Neal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/closures-dev/attachments/20100107/a388dbbf/attachment.html
More information about the closures-dev
mailing list