protocol for using InputRanges

Steven Schveighoffer schveiguy at yahoo.com
Fri Mar 28 18:11:43 PDT 2014


On Fri, 28 Mar 2014 20:14:39 -0400, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:

> On 3/28/14, 3:42 AM, Steven Schveighoffer wrote:
>> On Thu, 27 Mar 2014 20:25:56 -0400, Walter Bright
>> <newshound2 at digitalmars.com> wrote:
>>
>>> On 3/27/2014 2:31 PM, Steven Schveighoffer wrote:
>>>> Adding range primitives on top of a stream does not make sense.
>>>
>>> Are ready to implement a parallel universe of stream based algorithms
>>> to go alongside all the range based ones and be ready to constantly
>>> justify that to everyone?
>>
>> Not necessary. You just need to implement one range on top of a buffered
>> stream, and then it works with all other algorithms that accept input
>> ranges.
>>
>>> I'm also curious what a generic read() should do when the stream is
>>> empty.
>>
>> Returns 0 elements read.
>
> It increasingly seems to me we need to do this. -- Andrei

It is in the works. I need to finish it. I've been incorporating Dmitry's  
I/O buffer into my design.

-Steve


More information about the Digitalmars-d mailing list