Expression closures - use-cases for shortcut lambda syntax(blocks)

Brendan Eich brendan at mozilla.org
Mon Mar 19 13:51:48 PDT 2007


On Mar 19, 2007, at 1:43 PM, Dave Herman wrote:

>     function-expression
>         ::= "function" id? "(" formals ")" block           (a)
>          |  "function" id? "(" formals ")" expression      (b)
>          |  "function" id? "(" formals ")" "=>" expression (c)
>          |  "(" formals ")" "=>" expression                (d)
>
>     function-declaration
>         ::= "function" id "(" formals ")" block            (e)
>          |  "function" id "(" formals" ")" expression      (f)
>          |  "function" id "(" formals" ")" "=>" expression (g)
>          |  id "(" formals ")" "=>" expression             (h)
>
>     expression ::= ... | function-expression
>     declaration ::= ... | function-declaration
>
> I'm in favor of allowing (a), (c), (d), (e), and (g).

+1

/be




More information about the Es4-discuss mailing list