[whatwg/streams] Editorial: update use of, or stop using, completion values? (Issue #1224)

https://github.com/tc39/ecma262/pull/2547 has changed how completion records work. Now, if an operation is infallible, the recommended practice is have it not return a completion record. Also, everything has a header saying what it returns.

We could update to follow, similar to https://github.com/whatwg/html/pull/7661 .

Or, we could try to further harmonize with the rest of the web spec ecosystem, and stop doing completion records entirely. (Except where necessary to interface with ECMAScript.) I think I'd kind of prefer that. Concretely, we'd:

- Move away from ECMAScript abstract ops as much as possible, e.g. using the stuff introduced in https://github.com/whatwg/webidl/pull/987
- Get rid of all ? and !s for internal abstract op calls
- Change all explicit completion processing, e.g. instead of "If result is an abrupt completion, return [a promise rejected with](https://webidl.spec.whatwg.org/#a-promise-rejected-with) result.[[Value]].", say "If this throws an exception, catch it and return a promise rejected with that exception."
- Update any remaining use of ECMAScript abstract ops to appropriately use or not use ?/!

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/1224
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/streams/issues/1224@github.com>

Received on Thursday, 3 March 2022 02:04:44 UTC