Re: [whatwg/streams] Change default readableStrategy HWM to 0? (#777)

+1 to changing this. The disadvantages seem fine. I don't think we need the same defaults for readable vs. transform since we already know the readable strategy is very nich for transform streams.

The mechanics of how to do this are harder, hmm. I'm no longer convinced we're doing the right thing for non-transform streams, actually :(. With fresh eyes, I think I would have preferred that only `undefined` for the whole argument triggers defaults, and if it's not undefined, you have to specify both size and highWaterMark, otherwise you get errors.

Right now instead, providing `undefined` is the same as providing `{}`, and we have piece-wise defaults for size and highWaterMark. Oh well. So, how do we be consistent with that?

I think we do `{ size, highWaterMark } = {}`, and if highWaterMark is undefined, we change it to 0 before passing it to ReadableStream. So we don't necessarily pass the exact object through to the readable stream.

Practically I think this looks like your 3.

-- 
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/777#issuecomment-325036930

Received on Friday, 25 August 2017 21:20:41 UTC