Re: [whatwg/streams] Add section on other stream pairs (7e10304)

`pipeThrough()` only makes sense if chunks going into the `writable` are transformed into chunks coming out of the `readable`.

For a duplex stream, that can *sometimes* make sense, see e.g. the "transforming" WebSocket server example.

For endpoint pairs, chunks coming out of the readable are intended to be transformed into other chunks going into the writable. It *never* makes sense to pipe a readable stream that is not derived from `readable` into the `writable`, and then do something else with the `readable` that you get back from `pipeThrough()`:
```javascript
const { readable, writable } = createEndpointPair();
someOtherReadable // what readable stream would you pipe into `writable` if it's not derived from `readable`?
  .pipeThrough({ readable, writable })
  .pipeTo(someOtherWritable); // where would you pipe the `readable` to, other than `writable`?
```

-- 
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/commit/7e1030457817f1f3d4800ca7c11845ae71fc5f3d#commitcomment-41831490

Received on Thursday, 27 August 2020 22:39:43 UTC