- From: Domenic Denicola <notifications@github.com>
- Date: Wed, 03 Jun 2015 09:49:34 -0700
- To: whatwg/streams <streams@noreply.github.com>
Received on Wednesday, 3 June 2015 16:50:05 UTC
Ah yes, that is a reasonable thing to do. In balance though, I think it is better to require the source to understand read(view) and use controller.respond(). You can imagine cases where people want ReadableByteStreams that have a "fake BYOB" interface, that necessitates copying. But I think it is OK for that to be hard to implement, instead of easy. That is, the underlying source code would end up pretty complicated and ugly---it would need its own internal queue and it would copy from that queue into the supplied view inside read(view). You can still do it but it's not easy. In other words, I think if someone wants to create a ReadableByteStream with fake BYOB we should make them do that by writing a complicated underlying source, instead of take on that burden ourselves by complicating the ReadableByteStream machinery. --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/issues/353#issuecomment-108520478
Received on Wednesday, 3 June 2015 16:50:05 UTC