Re:It ain't about the callbacks, it's about the flow control
by kevingadd on Friday September 06, 2013 @12:17AM
(#6338632)
The concept of an event loop and event loop 'turns' is backed into ES promises the last time I read the draft spec and kept up with the spec discussions. It's not something you can polyfill in older versions of JS, it's a platform feature designed around how browsers work.
[ Parent
| on HN ]
Re:It ain't about the callbacks, it's about the flow control
by mook on Friday September 06, 2013 @01:25AM
(#6338836)
Hmm, do you recall where the ES promises spec lives? I can't find it in the ES6 draft ( http://people.mozilla.org/~jorendorff/es6-draft.html ), but it's in the DOM spec ( http://dom.spec.whatwg.org/#promises ). ES6 does end up having iterators, which does look useful for promises, though... see task.js.