State of generators?
Juan Ignacio Dopazo
dopazo.juan at gmail.com
Sat Jun 8 18:26:16 PDT 2013
2013/6/8 Allen Wirfs-Brock <allen at wirfs-brock.com>
> On Jun 8, 2013, at 1:42 PM, Juan Ignacio Dopazo wrote:
> - All methods seem to return the yielded result, not an object with a
> "value" property
> No, yield produces a nextResult object. The last line of the yield
> runtime semantics in 18.104.22.168 is:
> Return the result of GeneratorYield(CreateItrResultObject(value,
> Note that a iteration result object is being created and passed to the
> abstract operation at does the actual context switch.
> > So, is StopIteration back? How do we know if a generator is done?
> No. via a object that implements the ItrResult (name subject to change)
> interface as specified in 22.214.171.124
> I totally missed the CreateItrResultObject part. Thank you very much!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss