deprecating std.stream, std.cstream, std.socketstream

Walter Bright newshound2 at digitalmars.com
Wed May 16 09:13:40 PDT 2012


On 5/16/2012 7:49 AM, Sean Kelly wrote:
> On May 16, 2012, at 6:52 AM, Walter Bright<newshound2 at digitalmars.com>
> wrote:
>
>> On 5/15/2012 4:43 PM, Sean Kelly wrote:
>>> One thing I'd like in a buffered input API is a way to perform
>>> transactional reads such that if the full read can't be performed, the
>>> read state remains unchanged. The best you can do with most APIs is to
>>> check for a desired length, but what I'd I don't want to read until a
>>> full line is available, and I don't know the exact length?  Typically,
>>> you end up having to double buffer, which stinks.
>>
>> std.stdio.byLine()
>
> That was just an example. What if I want to do a formatted read and I'm
> reading from a file that someone else is writing to?  I don't want to block
> or get a partial result and an EOF that needs to be reset.

Then you'll need an input range that can be reset - a ForwardRange.


More information about the Digitalmars-d mailing list