Naming this construct, as frequently happens, was one of the more difficult parts of designing this API. AsyncStream
was the least bad name we were able to come up with. We'd be thrilled if the discussion on this thread hit upon a better name!
Our goals with the name AsyncStream
were:
- To have a concise name for the type, since we anticipate the type will frequently show up both at use sites and in API signatures.
- For the name to clearly convey that it's a... stream... you know... an async sequence of elements.
The main alternative name we considered was Series
. I personally advocated for AsyncStream
because:
-
Series
(to me) doesn't convey anything async, it's more of a synonym for sequence (e.g. see here). - Warning very subjective!
AsyncSeries
just seems like a weird synonym forAsyncSequence
.
Full disclosure, others were more concerned about the collision with Foundation.Stream
than I was. As @Jon_Shier says, other than modeling the same abstract concept, AsyncStream
has no relationship to Foundation.Stream
. If others feel like sharing the the "stream" suffix is confusing, please let us know—that's valuable signal!