Forward ranges in Phobos v2

Dukc ajieskola at gmail.com
Thu Nov 4 10:45:25 UTC 2021


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.


More information about the Digitalmars-d mailing list