simple shorter function syntax

Kevin Curtis kevinc1846 at
Sat Jul 24 09:21:09 PDT 2010

Should the proposed shorter form # desugar to function or a const function:

I dislike the verbosity of function - though I can't help feeling #
could be used for other ends.

let dict = #{"hello": 4, "world":5}; // it's a hash/dict not an object
let arr = #[4,4,5] // typed array - Numbers only - contiguous memory block?

Maybe the verbosity of function is painful when used as an anonymous
function. Does the blackslash idea for anon functions (only) work
grammar wise:

doIt(\(x) { alert(x * x) } ); // braces
doIt(\(x) ( x * x)); // parens - no return
let myfun = \(x) (x * x);

Also, is anything proposed for rationalizing ASI in Harmony.

More information about the es-discuss mailing list