Tricky semantics of ranges & potentially numerous Phobos bugs

monarch_dodra monarchdodra at gmail.com
Wed Oct 17 13:09:08 PDT 2012


On Wednesday, 17 October 2012 at 19:42:39 UTC, bearophile wrote:
> Andrei Alexandrescu:
>
>> You closed it.
>>
>> Also that bug has nothing to do with this topic because you 
>> can't compile the buggy code and have it silently do the wrong 
>> thing.
>>
>>
>> Andrei
>
> Sorry.
>
> A solution is to introduce a "byLineFast" that is similar to 
> the current "byLine", and make "byLine" copy.
>
> Another solution is to keep only "byLine" and give it a 
> compile-time boolean argument to disable the copy, that is 
> active on default.
>
> Bye,
> bearophile

Given that "byLine" already exists, I'm not sure we can change it 
now. But I wouldn't be against adding a "byLineSlow" or something.

However, if we could start again, I'd *definitely* favor a deep 
copying "byLine" by default, and have a faster, but harder to use 
"byLineFast".


More information about the Digitalmars-d mailing list