Schroedinger's Ranges

kdevel kdevel at vogtner.de
Thu Jun 3 13:00:38 UTC 2021


>>> a) What is the rationale behind not making byLineCopy the 
>>> default?
>>
>> byLine was the original implementation. byLineCopy was added 
>> later after the need for it became apparent.
>
> See:
>
> https://forum.dlang.org/post/lg4l7s$11rl$1@digitalmars.com

THX. BTW byLineCopy defaults to immutable char. That's why one 
has to use

     auto tmp = File(filename).byLineCopy!(char, char);

or

     auto tmp = File(filename).byLine.map!dup;




More information about the Digitalmars-d-learn mailing list