protocol for using InputRanges
Dmitry Olshansky
dmitry.olsh at gmail.com
Fri Mar 28 09:48:08 PDT 2014
28-Mar-2014 13:55, Walter Bright пишет:
> On 3/28/2014 1:32 AM, Johannes Pfau wrote:
>> Ranges have equivalents in other languages:
>> iterators in c++,
>> IEnumerator in c#,
>> Iterator in java
>>
>> all these languages have special stream types for raw data. I don't
>> think it's bad if we also have streams/ranges separate in D.
>
>
> Do you see a point to be able to, in an algorithm, seamlessly swap a
> socket with a string?
>
Certainly NOT a socket. There is no escaping the fact that there are
specifics to unbuffered direct streams.
What you mention only makes sense with buffering either implicit or (I'd
prefer) explicit.
> empty-front-popFront works with streams and non-streams. Why break this?
Pipe dream.
--
Dmitry Olshansky
More information about the Digitalmars-d
mailing list