Another relevant library that makes use of the same generator trick, but
integrated with promises, is Kris Kowal's Q API
https://github.com/kriskowal/q via Q.async:
https://github.com/kriskowal/q/blob/master/examples/async-generators/README.md
Event-driven programming without inversion of
More material:
http://calculist.org/blog/2011/12/14/why-coroutines-wont-work-on-the-web/
On Jan 17, 2012, at 21:30 , Dean Landolt wrote:
You can get these semantics with generators plus a library (see Dave Herman's
task.js [1] as a great example). As generators your `return function;`
Le 17/01/2012 21:38, Axel Rauschmayer a écrit :
More
material:
http://calculist.org/blog/2011/12/14/why-coroutines-wont-work-on-the-web/
... and a link to the proposal:
http://wiki.ecmascript.org/doku.php?id=harmony:generators
;-)
David
___
On Tue, Jan 17, 2012 at 3:54 PM, Jussi Kalliokoski
jussi.kallioko...@gmail.com wrote:
Yeah, I was aware of the coroutines in generators, that's why I said it
would be sort of sugar. :)
But it's not sugar, it's a different feature. It's the difference between
shallow and deep continuations.
Okay, now that I've been re-reading how generators work and about task.js,
it has made me realize my error. Yes, you're right, what I've made is
actually deep continuations, and that's not really what I had in mind.
Thanks everyone, I'll try to think of a better way to do this (or to find
out if
5 matches
Mail list logo