Pseudo headless arrows
michael.lee.theriot at gmail.com
Fri Apr 22 00:02:51 UTC 2016
Three equals used outside of strict equality might take some getting used
to `var fn ===> x`
On Thu, Apr 21, 2016 at 1:48 PM, Peter van der Zee <ecma at qfox.nl> wrote:
> <searched for it><excuses if>
> There are two ways of writing argument-less arrows;
> () => x;
> _ => x;
> (Where `_` can be any identifier, of course.) I understand why we
> can't drop the head entirely so if we're forced to type anything at
> all, anyways, why not at least make it simpler by pressing two
> different keys instead of three/four:
> ==> x;
> I don't believe this leads to syntactical problems anywhere, not even
> with arrow functions themselves and it's future proof for at least the
> cases I'm aware of.
> It's a minor addition but I think it's much nicer than either of the
> two alternatives we currently have, which lead to a lot of
> inconsistencies (it's spaces and tabs all over again).
> Semantics are the same otherwise as `() => x` would be.
> - peter
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss