hachyderm.io is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hachyderm is a safe space, LGBTQIA+ and BLM, primarily comprised of tech industry professionals world wide. Note that many non-user account types have restrictions - please see our About page.

Administered by:

Server stats:

9.6K
active users

Dan Gohman

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.