Hacker News new | past | comments | ask | show | jobs | submit login
Designing JS promises (2011) (raw.github.com)
56 points by ville on Nov 10, 2012 | hide | past | favorite | 6 comments



You can read this file with syntax highlighting on GitHub: https://github.com/kriskowal/q/blob/master/design/README.js


I 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


There'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/...

[2] https://github.com/promises-aplus/promises-spec


I can heartily recommend this library. I've been using it extensively both in the browser and in node.


Excellent write up. I'd love to see more libraries outline their core design decisions like this!


That was an excellent read; very well-executed on the part of the author.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: