transparent lambda

Neal Gafter neal at
Thu Jan 7 00:13:33 PST 2010

On Wed, Jan 6, 2010 at 11:39 PM, John Rose <John.Rose at> wrote:
> Using round parens as you do makes the syntax more distinctive.  But then it starts to look like an argument list, and to take up syntax room traditionally used for tuples.)

Not really.  The syntax form (e) already looks like both an argument
list, a tuple with one element, and a subexpression.  The block
expression makes things no worse or better.

> Maybe, instead of 0.6b block expressions, a let-expression could be like a labeled lambda without formals:
>  #label{ ... break label : value; ...}

I think using the # makes it too easily confused for a lambda.

> Or, dispensing with the hash mark but requiring parentheses:
>  (label:{ ... break label : value; ...})

It works, but I think it is too much syntactic noise.  It also starts
getting confused with a labeled block statement within a block

> With no need for parens in most places, especially argument and initializer expressions:

Without the parens it is ambiguous with a labelled statement.  I think
we should minimize the number of distinct syntactic forms rather than
handling different contexts differently.


More information about the closures-dev mailing list