State of generators?

Allen Wirfs-Brock allen at wirfs-brock.com
Sat Jun 8 17:25:56 PDT 2013


close and send have been eliminated.  The latest spec draft (rev 15) reflects that and includes an updated diagram

On Jun 8, 2013, at 4:29 PM, Rick Waldron wrote:

> I've just filed these:
> 
> https://bugs.ecmascript.org/show_bug.cgi?id=1555
> https://bugs.ecmascript.org/show_bug.cgi?id=1556
> 
> Rick
> 
> 
> On Sat, Jun 8, 2013 at 6:39 PM, Allen Wirfs-Brock <allen at wirfs-brock.com> wrote:
> The currently posted spec draft is up to date WRT generators
> 
> 
> Juan Ignacio Dopazo <dopazo.juan at gmail.com> wrote:
> 
> Hello,
> 
> I'm having trouble understanding the current status of generators. Last time I checked, the standard was what V8 has just implemented:
> 
> - Generator objects had next(), send(), throw() and close() methods
> - These methods returned objects with "value" and "done" properties
> 
> It seems now that:
> - send() and close() are gone
> - next(value) seems to be the same as send(value)
> - All methods seem to return the yielded result, not an object with a "value" property
> 
> So, is StopIteration back? How do we know if a generator is done?
> 
> Thanks,
> Juan
> 
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130608/5411a145/attachment.html>


More information about the es-discuss mailing list