Proposed Changes to the Range API for Phobos v3
monkyyy
crazymonkyyy at gmail.com
Fri May 17 05:23:04 UTC 2024
On Friday, 17 May 2024 at 04:48:24 UTC, Jonathan M Davis wrote:
> Whatever the operations are, _every_ finite range that defines
> indexing or slicing would then have to define all of them in
> order for generic code to be able to rely on them.
I disagree; slicing should be separate from indexing (and keys)
a hashmap can trivially provide a key, and reaccess the value,
but it probaly cant slice.
randomAccessRanges is a copy and paste with a clean up of c++
with its pointers, we have base types that airnt pointers.
I prefer just a free-for-all of optional functions, pre-emptive
compromise: bidirectionaly, key and indexing(by key), numeric
slicing; should be independent feature sets
More information about the Digitalmars-d
mailing list