Contrasting stream concepts:
- streams as *channels*. First-class handles for the read and write ends.
- streams as *coroutine creaters*. Functions with `stream` args or `stream` returns are like a coroutine consuming elements from the input streams and producing elements to the return streams.
Most of my experience is with channel style. In coroutine style, I sometimes think "what if someone passes you an output stream and then..." before remembering that that isn't a thing.
@sunfish oh heh, yeah — this distinction really tripped me up when switching from Node.js to Rust.
Streams in Node are like channels, “async streams” (misnomer imo) in Rust are like coroutines.