Brendan Eich (2013-05-10T18:36:57.000Z)
github at esdiscuss.org (2013-07-12T02:27:21.229Z)
Jason Orendorff wrote: > `.map()` is appealing, but to work with for-of statements, it would have > to support `break`, `continue`, and early `return`, either using exceptions > (like Scala's Breaks) or something new. Part of the appeal of the > iterator protocol is that it doesn't complicate `break`/`continue`/`return`. Agreed. JS ain't Scala. Note for Mike Stay, in case it helps a bit (just syntax): we agreed to use LTR order, so: ```js [for (x of expr1) for (y of expr2(x)) result(x, y)] ``` to shorten your example a bit. > Separately, for the list: are arrow-functions lexically transparent to > `super` and `arguments`? I hope so! For this kind of desugaring, if > nothing else. `super` like `this` is lexical -- the outer function's same-named keyword meaning. `arguments` per http://wiki.ecmascript.org/doku.php?id=harmony:arrow_function_syntax is an error. Perhaps we should change this to match the keywords. Allen?