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

Dave Herman dherman at ccs.neu.edu
Sun Mar 18 15:09:04 PDT 2007


> I like it, and agree with the details as captured here. I could go

I agree.

> without the parens around a single formal, but I've been writing a lot
> of ML code lately :) Maybe requiring parens is better; why have two ways
> to write something when one will do! Also, for now let's not extend this
> syntax to binding forms, inside or outside of a class. I have concerns
> about readability.

In your opinion, should we allow both

     function(formals) expression
     (formals) => expression

with the former allowed as both a declaration and expression form and 
the latter allowed as only an expression form? Or do we only allow

     (formals) => expression

and only as an expression form?

If we choose the latter, then there's no way to write function 
declarations with expression bodies, which seems like an unnecessary 
restriction.

Dave



More information about the Es4-discuss mailing list