Why do generator expressions return generators?

Brendan Eich brendan at mozilla.com
Fri Sep 6 10:24:38 PDT 2013


Brendan Eich wrote:
> (function*() { for (let x of [1,2, 3]) yield this[x]; }).call(this)

Then of course one has to say "the original value of .call", which is a 
pain.

Desugaring is less convenient than it ought to be without uniform 
parameterization support. (Generator arrow functions would help too. :-P^2)

/be


More information about the es-discuss mailing list