Re: [whatwg/streams] Add ReadableStreamBYOBReader.read(view, { min }) (#1145)

@domenic approved this pull request.

LGTM if you fix the mod vs. remainder issue; I pushed some minor editorial changes.

> @@ -3222,7 +3280,8 @@ The following abstract operations support the implementation of the
  1. Assert: |pullIntoDescriptor|.[=pull-into descriptor/reader type=] is not "`none`".
  1. Let |done| be false.
  1. If |stream|.[=ReadableStream/[[state]]=] is "`closed`",
-  1. Assert: |pullIntoDescriptor|'s [=pull-into descriptor/bytes filled=] is 0.
+  1. Assert: |pullIntoDescriptor|'s [=pull-into descriptor/bytes filled=]
+     mod |pullIntoDescriptor|'s [=pull-into descriptor/element size=] is 0.

Here and elsewhere, I think we should say "the remainder of dividing |x| by |y| is 0". Modulo and remainder are different for negative numbers, and JS's `%` is remainder.

The result doesn't matter for our case, where all the numbers are positive. But it's also just easier to understand at a glance.

I'm opening an Infra issue on this as well.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/1145#pullrequestreview-1647933747
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/streams/pull/1145/review/1647933747@github.com>

Received on Thursday, 28 September 2023 05:35:14 UTC