Re: [streams] Change the model for ReadableStream to have async read() (#288)

I think that's not quite right. Rather, we want users to be able to accomplish their tasks in full without having to switch back to the stream. That is why (in some iterations) we had a closed promise that just delegated to the stream itself. Otherwise anyone writing manual-reading code would have to remember to use the stream for closed and the reader for other operations.

I don't think it needs to be a complete substitute though. So no getReader, and no piping. That is, the purpose of similar API is to reduce cognitive load, not to actually be interchangeable to arbitrary consumers.
________________________________
From: Takeshi Yoshino<mailto:notifications@github.com>
Sent: ý2015-ý02-ý26 12:53
To: whatwg/streams<mailto:streams@noreply.github.com>
Cc: Domenic Denicola<mailto:d@domenic.me>
Subject: Re: [streams] Change the model for ReadableStream to have async read() (#288)


Domenic, one question. We designed ExclusiveStreamReader to be almost indistinguishable from ReadableStream. This was IIRC to allow user of the reader not to be aware of that he/she is touching a reader, not the original stream. Does this mean that the reader should also have getReader() to create a nested reader?

—
Reply to this email directly or view it on GitHub<https://github.com/whatwg/streams/pull/288#issuecomment-76228397>.


---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/288#issuecomment-76230955

Received on Thursday, 26 February 2015 18:05:27 UTC