protocol for using InputRanges

Walter Bright newshound2 at digitalmars.com
Fri Mar 28 02:55:45 PDT 2014


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?

empty-front-popFront works with streams and non-streams. Why break this?




More information about the Digitalmars-d mailing list