Tab Atkins Jr. (2013-05-12T05:34:16.000Z)
github at esdiscuss.org (2013-07-12T02:27:21.475Z)
In addition to what Brendan said about the cost of actually generating nested arrays in the common case, I don't think this desugaring does what you want - if you have only a single for-of, you'll just get an array back out, without a chance to call the custom flatten on it. You can't handle this generically, either, because the innermost for-of is handled as a map rather than a flatMap. You really do need to go monadic all the way, and as Brendan said, that's too much cost for the common case of Arrays. Let's just add do-expressions, or something similar, in the future. We can leave list comprehensions to their array specialization for now.