> Generators, besides supporting one level of coroutine suspending and 
> (re-)calling, are the cheapest way to implement an iterator.

I think Neil's inspiring demonstration of pseudo-threading with generators 
is also worthy of inclusion in your list of generator use cases:
http://www.neilmix.com/2007/02/07/threading-in-javascript-17/
It is quite interesting in that single level coroutines can be combined to 
create multi level coroutines in a form that provides explicit control of 
creating composable flow or maintaining atomicity. Generators are a pretty 
powerful and valuable construct, IMO. I certainly hope they stay in ES4 as 
well.
Kris 

_______________________________________________
Es4-discuss mailing list
Es4-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es4-discuss

Reply via email to