On Jul 26, 2010, at 1:06 AM, Cameron McCormack wrote:

>> 
> 
> I think having the braces on the outside would help with the
> aforementioned problem.  The vertical bars don’t particularly grab me
> (not being a Rubyist), but this does:
> 
>  [0, 1, 2, 3].map({ x => x * x }); // optionally { (x) => x * x }?
> 
>  function mapPairs(o, f) {
>    for (var p in o) {
>      f(p, o[p]);
>    }
>  }
> 
>  mapPairs(someObject, { (a, b) => a + '=' + b) });
> 
> (Sorry for adding more options to the discussion — quick rebuttals as to
> why the above wouldn’t work welcome.)

If you allow multiple arguments with this syntax, either with or without 
parens, you're back to unbounded lookahead required for an LL parser.

Regards,
Maciej

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to