Where'd Promise#done go?
forbes at lindesay.co.uk
Thu Jun 20 09:29:14 PDT 2013
> Do you have a link to a list to these questions?
Here are a few examples:
- [how to make-sequential rest webservices calls with angularjs](http://stackoverflow.com/questions/16854963/how-to-make-sequentially-rest-webservices-calls-with-angularjs/16856156)
- [Why does my Q chained promise rejection not behave the way I expect?](http://stackoverflow.com/questions/16596505/why-does-my-q-chained-promise-rejection-not-behave-the-way-i-expect/16610627)
- [Chaining 2 asynchronous calls to run serially](http://stackoverflow.com/questions/16311803/chaining-2-asynchronous-calls-promise-api-to-run-serially/16312136)
You can see many more questions by selecting the promises tag on stack overflow.
> native promises can have better integration with debugging tools
In deed they can, there are issues though. We will never be able to have the application crash in the event that an unhandled rejection occurs. That's no big deal for browsers, where the idea of carrying on with a best effort attempt is so ingrained anyway, but it's a significant issue for node.js and WinJS apps. In both those cases I don't really look at the logs unless I know something's gone wrong, which might lead to bugs going undiscovered for a long time.
I think it's important that there be a way to say, "If this rejection is not handled, crash my application".
> I'm always surprised when people think that any of these callback forms are the fundamental starting point.
They aren't the fundamental starting point from either a conceptual point of view or an implementation point of view. However, most people in the short term will start out with knowledge of either callbacks (if they come from node.js) or the weird event style onSuccess and onFail handlers (if they come from the browser). This means that most of the time when we teach promises we're going to have to teach it with that as the starting point of knowledge, not with message sending as the starting point.
More information about the es-discuss