On Wed, Jan 18, 2012 at 10:28 AM, Gavin Barraclough
<[email protected]>wrote:

> Just a thought, has a prefix ^ been considered?
>
> A lambda that takes no arguments could be:
> ^{ /*...*/ }
> And a lambda with some arguments:
> ^(x,y){ /*...*/ }
>
> I just find this really readable, the syntax for lambdas that take no
> arguments is delightfully minimal (just one extra character!), my brain is
> well trained to expect argument lists to be delimited by parentheses so I
> find this much easier to understand, and I find the ^ character pleasingly
> evocative of λ. :-)
>

This is really a matter of taste.

    { (a, b) ... }

    ^(a, b) { ... }

    { |a, b| ... }

Of course, some characters are easier to type than others, especially in
non-qwerty keyboards (I'm thinking about the pipe "|").

But what matters most is readability, since code is more often read than
written. So far, people seem to think that pipes are more readable.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to