- From: Kevin Smith <zenparsing@gmail.com>
- Date: Thu, 5 Sep 2013 10:10:24 -0400
- To: Kris Kowal <kris.kowal@cixar.com>
- Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>, "www-dom@w3.org" <www-dom@w3.org>, es-discuss <es-discuss@mozilla.org>
- Message-ID: <CA+mDt2yN1gqxySBJbNkm67mx+YVbjaT8WKB3uh0NROYkemD2JA@mail.gmail.com>
Hi Kris,
Thanks for the details! This gives us an idea what a "promise monitoring"
feature might look like in a browser's developer tools. I think such a
feature would be really cool, but I believe that promise-using programs
ought to be debuggable using just a console. Indeed, for a non-GUI
embedding like Node, they *must* be debuggable using just a console.
I don't think we should ship an API that is not debuggable using a console.
However, I'm *not* in favor of a `done` method on the Promise prototype
because of functional overlap with `then`.
Another option is a static method which takes a promise and throws
rejections ala done:
Promise.throw(makeSomePromise.then(...));
Personally, I consider it a shame that promise libraries punted on the
distinction between rejections and program errors, but I suppose it's too
late to go there.
{ Kevin }
Received on Thursday, 5 September 2013 14:10:51 UTC