opNext: Simplified ranges

Tejas notrealemail at gmail.com
Mon Nov 7 02:49:13 UTC 2022


On Sunday, 6 November 2022 at 22:32:00 UTC, Sebastiaan Koppe 
wrote:
> On Sunday, 6 November 2022 at 21:08:10 UTC, Per Nordlöw wrote:
>> It all boils down to fitting the design to the most common use 
>> case. So is the most common case to be able to peek or not? I 
>> really don't know right. Does anybody have any insights into 
>> this?
>
> I actually think the most lowest range should be one with 
> destructive read semantics; non-peekable, non-copyable. You can 
> build everything on top of that.
>
> I also think ranges should be redesigned to have a 2 stage api. 
> One to build the pipeline, one to iterate.

You have talked about redesigning ranges multiple times before as 
well, plus have expierience using them non-trivially for quite 
some time.

Could you please create a post/document that contains all your 
ideas/thoughts about what a redesigned range would look like? The 
maybe someone could actually work towards implementing it. If not 
directly within phobos, then atleast they could create a package 
and we could test the new ranges' efficacy for real world usage


More information about the Digitalmars-d mailing list