Proposed Changes to the Range API for Phobos v3

monkyyy crazymonkyyy at gmail.com
Mon Sep 23 08:56:20 UTC 2024


On Monday, 23 September 2024 at 08:20:59 UTC, Eyal Lotem wrote:
> showing how a single-method range protocol is better 
> optimized[1] than the 3 method range protocol.
> **opApplyRange**

Is opApply even an iterator interface? Per the talk comparing the 
function count of iterators

https://youtu.be/d3qY4dZ2r4w?si=sRWCtba_njjqrOCP

> phobosRange
> import std: map, filter;

How would you know the difference between phoboes complexity 
confusing the optimizer vs the 3-ness?

----

3 function ranges are good for sane api reasons even if slower, 
much less optional  indexing allowing for binary search, allowing 
in-place sorts etc.


More information about the Digitalmars-d mailing list