tc39 / proposal-promise-try

ECMAScript Proposal, specs, and reference implementation for Promise.try
https://tc39.es/proposal-promise-try/
MIT License
240 stars 11 forks source link

Path to Stage 4! #15

Open ljharb opened 7 months ago

ljharb commented 7 months ago

Stage 4

~Stage 3~

~Stage 2.7~

~Stage 2~

~Stage 1~

rkirsling commented 7 months ago

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

ljharb commented 7 months ago

Thanks, done in fdb9bd2

rkirsling commented 6 months ago

Went ahead and implemented it in JSC right away: https://github.com/WebKit/WebKit/commit/6d51d579af47028306a003653150ade5d395f942

syg commented 5 months ago

Editorially, spec draft lgtm.

Normatively, I'd like https://github.com/tc39/proposal-promise-try/pull/16 merged (which also lgtm).

bakkot commented 5 months ago

LGTM with #16.

michaelficarra commented 5 months ago

LGTM

linusg commented 5 months ago

Implemented in Kiesel: https://codeberg.org/kiesel-js/kiesel/commit/5e215d3dc8839768960343f4ca7e2764c188828a

linusg commented 5 months ago

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

gibson042 commented 5 months ago

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.

jridgewell commented 5 months ago

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.

gibson042 commented 5 months ago

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: https://github.com/tc39/proposal-async-context/issues/80

Delapouite commented 2 months ago

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

lishaduck commented 3 weeks ago

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

alexsch01 commented 1 week ago

https://github.com/WebKit/WebKit/pull/31556 So webkit now enables this by default it seems