Re: Promises: final steps

Kevin Smith <[email protected]>
Newsgroups gmane.comp.lang.javascript.ecmascript4.general,gmane.comp.web.dom.general
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 }

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.