== Arrow syntax ==
The nicest proposal I have seen has been written by David Herman:
https://gist.github.com/2011902
== More traditional solution ==
1. Short notation for non-TCP functions: use fn; enables one to abbreviate
"function" as "fn" [1]. Optional, not sure if that’s a good idea: Implicit
return of completion value and lexical `this`.
For example:
use fn;
arr.map(fn (x) { x * x });
2. Block lambdas for TCP-adhering callable blocks with lexical `this`, which
previously seemed like the main contender. As a TCP-adhering syntactic
alternative to block lambdas, Allen mentioned the following on Twitter:
do (args) { ... }
Open question: fn and function behaving differently seems like a bad idea,
because then things are less consistent. But then you have to wonder if fn is
really worth the trouble for only saving 6 characters.
[1] https://twitter.com/awbjs/status/178792012215091200
--
Dr. Axel Rauschmayer
[email protected]
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss