How is chunkBy supposed to behave on copy
Paul Backus
snarwin at gmail.com
Mon Mar 23 17:57:43 UTC 2020
On Monday, 23 March 2020 at 17:37:16 UTC, H. S. Teoh wrote:
> On Sun, Mar 22, 2020 at 04:23:27PM +0000, Paul Backus via
> Digitalmars-d wrote:
>> Technically, this is already legal--isInputRange accepts
>> non-copyable structs.
>>
>> Of course, if you accept non-copyable ranges as legitimate,
>> someone has to go and fix all of std.algorithm and std.range
>> to handle them correctly, which is a non-trivial amount of
>> work.
>
> I don't think it's wise to do this with the existing codebase.
> A change as drastic as removing .save will likely require
> rewriting not just large chunks of Phobos, but existing user
> code as well. This is probably best left to Phobos v2, if that
> ever happens.
>
>
> T
Agreed. I was only talking about making pure input ranges
non-copyable (i.e., requiring all code that copies a range to use
either .save or move), which is not (strictly speaking) a
breaking change to the existing range interface.
More information about the Digitalmars-d
mailing list