Block lambda is cool, its syntax isn't

Thaddee Tyl thaddee.tyl at
Fri Jan 13 10:04:09 PST 2012

2012/1/13 Quildreen Motta <quildreen at>:
> I have an obvious bias towards 1 because I think Unicode symbols
> describe much better the underlying intentions and semantics than
> their ASCII alternatives (usually), however not many people creates
> mappings for these symbols on their .XCompose (or even have a compose
> key handy).
> I remember you mentioning that the Haskell-ish alternative `\x, y {
> body }' or `.\x, y { body }' was not practical, because \ is already a
> valid escaping character in identifiers (?)
> Given those above, despite my usual disliking of Ruby syntax, I prefer
> the pipes over parenthesis, given the latter has an already too
> overloaded semantics, such that `{ (foo, bar) (2) }' would look pretty
> confusing, at least to me. However, what about `{x, y: body}'? Granted
> we don't allow labels immediately following a lambda block (and I'm
> not sure labels are used much in the language, I could be wrong
> however).

That would mean that a block lambda with no parameters is

    {: body}

Don't you think it looks odd?

Plus, parentheses are what JS uses for parameters.

More information about the es-discuss mailing list