Re: [whatwg/streams] ReadableStreamDefaultController seems redundant (#743)

There is definitely some duplication between the ReadableStreamDefaultController API and the WritableStreamDefaultWriter API. The way I think about it is that they are specialised for different priorities: I assume that reading from a source is roughly side-effect free. I assume that operations can be retried, so we can be less sensitive about data loss. This is reflected in `controller.enqueue()` having no indication of success or failure. On the other hand, WritableStream is designed with extreme care to avoid data loss even when the developer is not particularly careful, and to make it easy for developers to be extra careful. This is reflected in the fact that `writer.write()` permits the writer to wait for the underlying sink to complete.

I am sorry for not responding to your points in detail. Hopefully someone else will fill in the gaps.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/743#issuecomment-300354633

Received on Wednesday, 10 May 2017 02:18:12 UTC