- From: Domenic Denicola <notifications@github.com>
- Date: Mon, 07 Mar 2022 07:35:31 -0800
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/streams/issues/1224/1060818793@github.com>
> Would we have to explicitly write "Assert: This does not throw an exception" everywhere? We wouldn't have to. We could if it's helpful. I'd suggest only doing it in cases where the not-throwing is potentially surprising. (Which is of course subjective.) This is related to [the question of whether/how we should introduce headers](https://github.com/whatwg/streams/pull/1225#issuecomment-1060810692) to the abstract operations, like ECMAScript now has. If we keep !/? and just follow ECMAScript, then the headers could look something like: > AcquireWritableStreamDefaultWriter(stream) returns either a [normal completion containing](https://tc39.es/ecma262/#sec-completion-record-specification-type) a `WritableStreamDefaultWriter` or an [abrupt completion](https://tc39.es/ecma262/#sec-completion-record-specification-type). It performs the following steps: > IsReadableStreamLocked(stream) returns a boolean. It performs the following steps: > ReadableStreamAddReadRequest(stream, readRequest) returns unused. It performs the following steps: Or they could be omitted if we think they're not worthwhile. Whereas if we do web spec style, then I think omitting is probably more conventional, since most specs are not very explicit about whether their operations can throw or not; it's just kind of assumed things will flow throughout. But if we did want headers they would look something like: > AcquireWritableStreamDefaultWriter(stream) either returns a a `WritableStreamDefaultWriter` or throws. It performs the following steps: > IsReadableStreamLocked(stream) returns a boolean. It performs the following steps: > ReadableStreamAddReadRequest(stream, readRequest) performs the following steps: -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/issues/1224#issuecomment-1060818793 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/streams/issues/1224/1060818793@github.com>
Received on Monday, 7 March 2022 15:35:44 UTC