js-promise-integration icon indicating copy to clipboard operation
js-promise-integration copied to clipboard

Draft of new explainer with revised API

Open fgmccabe opened this issue 1 year ago • 2 comments

The API has been revised according to discussions in stack sub-group; and the explanations have been updated to reflect the changes: No mention of Suspender object

fgmccabe avatar Mar 11 '24 23:03 fgmccabe

A quick comment on the API itself: I think it would make more sense to have a single WebAssembly.Suspending(Function) constructor, rather than WebAssembly.suspending(Function) returning a WebAssembly.Suspending.

  • It's more consistent with other wasm APIs (WA.Table, WA.Memory, ...),
  • It's less confusing (IMHO)
  • WebAssembly.Suspending is essentially useless if it's not a constructor, e.g. you cannot do instanceof WebAssembly.Suspending, and the observable interface is empty

Sorry for bringing a discussion about the API itself during code review, but hopefully this is a small and non-controversial change.

thibaudmichaud avatar Apr 17 '24 10:04 thibaudmichaud

Good suggestion. And this is the right place to raise a comment like this

fgmccabe avatar Apr 17 '24 14:04 fgmccabe