Design principles for extending ES object abstractions

Brendan Eich brendan at
Fri Jul 8 16:01:32 PDT 2011

On Jul 8, 2011, at 3:59 PM, Brendan Eich wrote:

> But the stronger reason for "function*" as mandator

"mandatory" of course (need new keyboard).

> generator syntax introducer came when we considered "yield*" ("yield from" in Python's PEP380): the utility of a zero-iterations basis case for a sub-generator. As Dave noted, otherwise you'd have to write "function* () {if (false) yield;}" or some such.

"function () {if (false) yield;}" of course -- the hypothesis there assumes no "*" after "function", in which case you must write a dead "yield" to make the function be a generator in the first place.


More information about the es-discuss mailing list