Re: [streams] What should we call ReadableByteStream.prototype.getBYOBReader()? (#294)

In offline discussion last Thursday, we categorized the readers we've been designing using a matrix.

| Alloc / Pull | Auto | Manual |
|----|----|----|
| BYOB | - | A |
| Auto | B | C |

(BYOB && Auto pull) doesn't make sense. So, it's marked `-`.

We're going to at least provide factory methods for A, B.

The "Alloc: auto" row also applies to object streams. Both of B and C make sense. I think C means that pulling one element.

For byte streams, I realized that I don't know what we should do for C well. C is manual pull. We're going to pull some bytes. How many? The user needs to call `read()` to pull bytes though they cannot specify the amount of data to pull. Domenic, what do you think about C? Is this kinda method to say "please read now, but decide how much to pull by yourself" to the reader?

----

So, if A, B and C make sense for byte streams, and B and C make sense to object streams, how should we organize the factory methods?

- Byte stream
    - getBYOBManualPullReader: A
    - getAutoPullReader: B
    - getManualPullReader: C
- Object stream
    - getAutoPullReader: B
    - getManualPullReader: C

Gave verbose names for the first step.


---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/294#issuecomment-81428113

Received on Monday, 16 March 2015 06:11:29 UTC