Why the ECMAScript 2015 Promises don't have finally methods?

Benjamin Gruenbaum benjamingr at gmail.com
Sat Jul 4 12:23:00 UTC 2015

The reason ECMAScript 2015 promises do not have `finally` is because it
wasn't necessary for the initial proposal and things were 'running late'
already and it was possible to ship without it. Shipping fast enabled us to
include promises in ECMAScript 2015.

It is entirely possible (and dare I say - likely) that `finally` will be
included in a future version, note that when promise cancellation makes it
in - `finally` might have specific semantics for that so it's probably
better to wait for it for until we have cancellable promises.

Quoting Domenic from a previous esdiscuss discussion:

> Although I find the arbitrary division of features into "ES6" and "ES7"
distasteful personally: yes, ES6 will not be adding new APIs. That doesn't
mean that Promise.prototype.finally won't ship in all major browsers before
other ES6 features do. But it does mean that we won't be submitting a
document to the Ecma general assembly with Promise.prototype.finally before
we submit one with proper tail calls.

Some context:

 - https://github.com/domenic/promises-unwrapping/issues/18
 - https://esdiscuss.org/topic/proposal-promise-prototype-finally
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150704/fa9cb274/attachment.html>

More information about the es-discuss mailing list