opNext: Simplified ranges

Per Nordlöw per.nordlow at gmail.com
Sun Nov 6 21:08:10 UTC 2022


On Sunday, 6 November 2022 at 21:06:01 UTC, Per Nordlöw wrote:
> That's not a blocker if we can afford implementing a second 
> function for the "peek" case. This is the path Rust took via 
> its `Peekable` trait and `peek()` member as described at
>
> https://doc.rust-lang.org/stable/std/iter/struct.Peekable.html

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?


More information about the Digitalmars-d mailing list