> Is the consensus that this won't make it into Promise until at least ES7, and 
> then only if there's enough of a call for it?

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.

> To be honest, if ES7 has something like async/await then it won't need 
> Promise.prototype.finally.

That's mostly true, I suppose, but it can increase brevity in some cases:

```js
function doThingySafely() {
  return doThingy().finally(cleanup);
}

// vs.

async function doThingySafely() {
  try {
    return await doThingy();
  } finally {
    return cleanup();
  }
}
```
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to