An IO Streams Library

Wyatt via Digitalmars-d digitalmars-d at puremagic.com
Mon Feb 8 07:33:31 PST 2016


On Sunday, 7 February 2016 at 00:48:54 UTC, Jason White wrote:
>
> This library provides an input and output range interface for 
> streams (which is more efficient if the stream is buffered). 
> Thus, many of the wonderful range operations from std.range and 
> std.algorithm can be used with this.
>
Ah, grand!  I love the idea and my impression from browsing the 
source a bit is positive enough to say I'm looking forward to 
what comes out of this.

Though I AM a little ambivalent-- I had a series of pretty 
in-depth conversations on this topic with a friend a while back 
and we came to a consensus that stream semantics are a tricky 
thing because of the historical baggage around them and how they 
tend to get conflated with other concepts.

Looking at your API design, I think you've hit close to a lot of 
the same conclusions we reached, but here are the notes I took 
for the sake of providing an additional perspective:
http://radiusic.com/doc/streamNotes (Sorry, I tried just pasting 
them and it was moderately unreadable even in the preview)

I think the most important things we hit upon are:
1. A stream is fundamentally unidirectional.
2. A stream is raw, untyped data that becomes a range through an 
adapter that mediates access.

-Wyatt


More information about the Digitalmars-d mailing list