block lambda revival

Jon Zeppieri zeppieri at
Wed May 25 13:47:22 PDT 2011

On Wed, May 25, 2011 at 4:01 PM, Brendan Eich <brendan at> wrote:
> On May 25, 2011, at 8:44 AM, Jon Zeppieri wrote:
>>   {|x| x}(bar)
> The new grammar forbids that, though.
> You must parenthesize the block-lambda to invoke it with a parenthesized
> argument list:
>   ({|x| x})(bar)
> Block-lambdas are most commonly used as actual arguments, not as literal
> callees in call expressions. To avoid trouble of the kind Waldemar pointed
> out, they must be caged by parentheses on the outside to be used that way.

Ok, I don't see a place for BlockLambda outside of call contexts in
your grammar, so I didn't get that. Or is your addition to

   ( CallWithBlockArguments )

suposed to be

   ( BlockLambda )


And examples like

   let empty = {| |};

are now

   let empty = ({| |});


More information about the es-discuss mailing list