Forward ranges in Phobos v2

Paul Backus snarwin at gmail.com
Thu Nov 4 12:59:52 UTC 2021


On Thursday, 4 November 2021 at 10:45:25 UTC, Dukc wrote:
> On Thursday, 4 November 2021 at 04:06:15 UTC, Andrei 
> Alexandrescu wrote:
>> I think it can be made to work, but for lvalue ranges only, 
>> and it will be difficult to make safe (scoped etc).
>>
>> Overall this seems to create more problems than it solves.
>
> Yeah, I think we should keep the `front`/`popFront`/`empty` 
> scheme. Not because it's necessarily better, but because 
> there's always a high risk for scope creep and second-system 
> effect when doing projects like Phobos v2. Even discarding 
> autodecoding and `isForwardRange` will be a lot of work 
> already, let's not bite more than we can swallow.

I agree that this is definitely not a v2 proposal--more like v3 
or v4. But I do think it should be on the roadmap.


More information about the Digitalmars-d mailing list