tc39/proposal-promise-try

Path to Stage 4!

Opened this issue · 14 comments

Stage 4

  • committee approval
  • two implementations
    • WebKit, behind a flag and with arg forwarding (PR) - no longer behind a flag (PR)
    • Keisel
    • Boa
    • LibJS
    • Chrome / v8 (v128)
    • Firefox / spidermonkey issue issue 2 (behind a flag in v132 nightly, targeted for 133 or 134 unflagged)
    • Bun (tweet)
    • CloudFlare Workers (tweet
  • significant in-the-field experience
  • ecma262 PR approved
  • prepare ecma262 PR (PR)

Stage 3

  • merge test262 tests
  • write test262 tests (PR)
  • receive implementer feedback

Stage 2.7

Stage 2

  • incorporate enumeration (#17)
  • committee approval
  • spec text written

Stage 1

  • committee approval

LGTM overall; my one comment would be that maybe we should include the NOTE attached to Promise.resolve here too.

Thanks, done in fdb9bd2

Went ahead and implemented it in JSC right away: WebKit/WebKit@6d51d57

syg commented

Editorially, spec draft lgtm.

Normatively, I'd like #16 merged (which also lgtm).

LGTM with #16.

LGTM

This was so simple that I decided to implement it in two more engines :)

I have reservations about Promise.try accepting variadic arguments that leave no room for ever specifying a receiver—setting it apart from Function.prototype.{apply,call} and Reflect.apply. However, they do not rise to the level of a blocking concern. Consider this a signoff from me.

I have reservations about Promise.try accepting variadic arguments that leave no room for ever specifying a receiver—setting it apart from Function.prototype.{apply,call} and Reflect.apply.

AsyncContext is also doing this for our run methods, so this won't be the only one.

I have reservations about Promise.try accepting variadic arguments that leave no room for ever specifying a receiver—setting it apart from Function.prototype.{apply,call} and Reflect.apply.

AsyncContext is also doing this for our run methods, so this won't be the only one.

Then the same concerns apply there: tc39/proposal-async-context#80

Here's the Bugzilla link to follow Firefox's implementation: https://bugzilla.mozilla.org/show_bug.cgi?id=1905241

Haven't updated to 128 yet, but it seems to support this! (https://developer.chrome.com/release-notes/128#promisetry)

WebKit/WebKit#31556
So webkit now enables this by default it seems