Re: [streams] Support reading bytes into buffers allocated by user code on platforms where only async read is available (#253)

Oh. One other thing I realized looking over OperationStream and OperationStatus.

As you know I would prefer to have similar APIs between ReadableStream and ReadableByteStream. So if read() for ReadableStream returns just the data chunk, then for ReadableByteStream we should return just the data chunk (whether that be an `ArrayBuffer` or, more likely it seems now, a `Uint8Array`). So OperationStatus seems not so good for the readable side. (Unless, perhaps, it is part of some sort of `Promise<{ value, done, ack, bytesRead, ... }>` thing for async read, but it sounds like we are going away from async read.) Is that OK or does it mess with your plans?

For the writable side it might make more sense. The return value of `write()` is not always used very much anyway, so if it becomes a bit more work to check it then that is OK.

But in general, now that I remember this I would like to work out in full what role we see for OperationStatus-type things, both for readable and writable, byte and non-byte.

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

Received on Tuesday, 3 March 2015 17:43:27 UTC