simple shorter function syntax
Brendan Eich
brendan at mozilla.com
Mon Jul 26 10:08:46 PDT 2010
On Jul 26, 2010, at 10:00 AM, Kevin Curtis wrote:
> Re backslash and the issue of creating an escaping hazard when JS code
> is included in a quoted string.
>
> How so - is there a problem with eval'ing:
> eval("[0, 1, 2, 3].map(\(x) {x * x})");
js> "\(".length
1
js> "\(".charAt(0)
"("
Big problem.
> (The backslash is sweet on both us and euro keyboards - no shift
> needed as with # or @. yeah trivial...).
Shifting is a problem, I've heard from RSI-suffering friends.
/be
More information about the es-discuss
mailing list