buffered input

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Feb 7 09:27:33 PST 2011


On 2/7/11 7:53 AM, Steven Schveighoffer wrote:
> On Sat, 05 Feb 2011 00:46:40 -0500, Andrei Alexandrescu
> <SeeWebsiteForEmail at erdani.org> wrote:
>
>> I've had the opportunity today to put some solid hours of thinking
>> into the relationship (better said the relatedness) of what would be
>> called "buffered streams" and ranges. They have some commonalities and
>> some differences, but it's been difficult to capture them. I think now
>> I have a clear view, caused by a few recent discussions. One was the
>> CSV reader discussed on the Phobos list; another was the discussion on
>> defining the "right" std.xml.
>
> [snip]
>
>> What do you all think?
>
> I haven't read many of the responses, but I'll say again what I've
> always said. The range concept does not fit streams very well. I think a
> range can be built on a stream, but I think a buffered stream should be
> it's own type (similar to how you laid it out a few weeks ago).
>
> IMO, a stream should be a simple class hierarchy that defines
> input/output and buffering. Then ranges can be built on top of the
> stream to interface with other parts of phobos.

One good thing about the current proposal is that it integrates 
seamlessly with that one.


Andrei


More information about the Digitalmars-d mailing list