3 ms·
Designing JS promises (2011)
- twiceaday 14y agoI thought this was going to be about the sad state of JS. Instead it was an interesting read about JS futures. http://en.wikipedia.org/wiki/Futures_and_promises http://en.wikipedia.org/wiki/Futures_and_promises
- k3n 14y agoThat was an excellent read; very well-executed on the part of the author.
- dinduks 14y agoYou can read this file with syntax highlighting on GitHub: https://github.com/kriskowal/q/blob/master/design/README.js https://github.com/kriskowal/q/blob/master/design/README.js
- d4mi3n 14y agoExcellent write up. I'd love to see more libraries outline their core design decisions like this!
- philbo 14y agoThere's been a lot of talk [1] about promises on es-discuss in the last week or so. It looks like an effort is underway with a view to standardising them as part of the language in the ES7 spec, possibly with a harmonised DOMPromises spec to come sooner than that for use in the W3C recommendation track. The other recent development in this area was the announcement of Promises/A+ [2], an attempt to clarify all of the behavioural aspects of JS promises in a single spec that many implementations can support. All in all, I'd say that things are moving very healthily forward in this regard. [1] https://mail.mozilla.org/pipermail/es-discuss/2012-November/026188.html https://mail.mozilla.org/pipermail/es-discuss/2012-November/... [2] https://github.com/promises-aplus/promises-spec https://github.com/promises-aplus/promises-spec
- ef4 14y agoI can heartily recommend this library. I've been using it extensively both in the browser and in node.