yield and new : SpiderMonkey and the draft Spec
John J. Barton
johnjbarton at johnjbarton.com
Tue Mar 15 07:58:58 PDT 2011
On 3/14/2011 10:08 PM, Brendan Eich wrote:
> On Mar 14, 2011, at 11:50 PM, John J. Barton wrote:
>> On 11:59 AM, Brendan Eich wrote:
>>> However, there's no way for a generator function to return that instance, because a generator function always implicitly returns a fresh generator iterator when invoked. It could store |this| in the heap, and whatever value |this| receives is saved as part of the shallow continuation capture by the generator.
>> The implicit return of a fresh generator iterator makes the example confusing.
> It's just like Python.
and Python is perfect? Even successful features have room for improvement.
More information about the es-discuss