phobos: What type to use instead of File when doing I/O on streams?
J.Frank via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Nov 9 11:42:51 PST 2015
On Monday, 9 November 2015 at 18:44:00 UTC, Alex Parrill wrote:
> Ranges are streams. file.byLine(Copy) and byChunk are
> effectively streams that are ranges.
I might be wrong, but from what I read so far I don't think that
"ranges are streams":
- Can you read an arbitrary length of bytes from a range?
(Reading by line in my code was just an example.) The only way I
see is to make it a byte range. But then reading n bytes would
result in n calls to popFront(), which is out of the question for
performance reasons. Is this correct?
- Can you flush() a range?
- Can you use select() on a range?
etc.
(BTW. Where do I find select()/poll() in phobos?)
More information about the Digitalmars-d-learn
mailing list