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

Jeff Dyer jodyer at adobe.com
Mon Mar 19 14:35:06 PDT 2007


> Your argument is not consistency, but brevity: "because the latter
> erase characters from the current function expression form, while the
> former adds '=>'". A different consistency argument, with the new
> lambda syntax, favors =>

I'm arguing for consistence too. The keyword forms of function are
visually more closely related than the two expression forms. Let
statements and expressions support this relationship. What we do for
function expressions we should do for let expressions.

     let (x=y) x

become

     let (x=y) => x

But => has limited appeal to me. I'd like to use it only as we agreed
yesterday, in function expressions without a 'function' head. In all
other contexts it just adds clutter.

Jd



More information about the Es4-discuss mailing list