2011/6/23 Brendan Eich <[email protected]>:
> On Jun 23, 2011, at 4:07 PM, Rob Campbell wrote:
>
> > I'm liking the block-lambda syntax, I think more than the arrow. One
> > possible shortening could be to exclude the second bar (|) if no argument
> > variables are specified.
> > {| // some block of code };
> This does not work. How do you know that what follows the first | is not a
> formal parameter?
> Formal parameter syntax looks like expression syntax -- currently Expression
> covers FormalParameterList. Arrow function syntax relies on this.
> /be
Are you thinking that
{| a | a }
it is ambiguous whether
function (a) { return a; }
or
function () { return a | a; }
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss