return when desugaring to closures

Mark S. Miller erights at google.com
Sat Oct 11 16:23:26 PDT 2008


On Sat, Oct 11, 2008 at 4:05 PM, Dave Herman <dherman at ccs.neu.edu> wrote:
> Read the proposal again: the statement form of lambdas *does* return the
> value of its last expression; this is what ES3 calls the "completion value."

At <http://wiki.ecmascript.org/doku.php?id=strawman:lambdas>:
> Expression  ::= ... | lambda Formals Block
>                     | lambda Formals Expression
> Declaration ::= ... | lambda Identifier Formals Block
>                     | lambda Identifier Formals Expression

How about just

  Expression  ::= ... | lambda Formals? Block

?

-- 
    Cheers,
    --MarkM


More information about the Es-discuss mailing list