Another new io library

Wyatt via Digitalmars-d digitalmars-d at puremagic.com
Thu Feb 18 08:07:49 PST 2016


On Wednesday, 17 February 2016 at 06:45:41 UTC, Steven 
Schveighoffer wrote:
>
> foreach(line; (new IODevice(0)).bufferedInput
>     .asText!(UTFType.UTF8)
>     .byLine
>     .asInputRange)
>    // handle line
>
This looks pretty all-right so far.  Would something like this 
work?

foreach(pollItem; zmqSocket.bufferedInput
     .as!(zmqPollItem)
     .asInputRange)

> 3. The focus of this library is NOT replacement of std.stream, 
> or even low-level i/o in general.
>
Oh.  Well maybe that's not the case, but it may have potential 
anyway.  If nothing else, for testing API concepts.

> 6. There is a concept in here I called "valves". It's very 
> weird, but it allows unifying input and output into one 
> seamless chain. In fact, I can't think of how I could have done 
> output in this regime without them. See the convert example 
> application for details on how it is used.
>
This... might be cool?  It bears some similarity to my own ideas. 
  I'd like to see more examples, though.

-Wyatt


More information about the Digitalmars-d mailing list