C++ / Why Iterators Got It All Wrong
jmh530 via Digitalmars-d
digitalmars-d at puremagic.com
Mon Sep 4 08:19:25 PDT 2017
On Monday, 4 September 2017 at 04:29:36 UTC, Ilya wrote:
>
> Maybe I should call it cursors or generic pointers instead of
> iterators.
dcollections uses a cursor approach that seems different from
yours
https://github.com/schveiguy/dcollections/blob/master/concepts.txt
Maybe generic pointers makes more sense? Unless I'm mistaken, mir
iterators are more like pointers with specific operations defined
for how they are incremented, assigned, etc.
I had been a little confused by the name iterators because I
don't see any functions in mir that use begin/end. But I don't
know if that's more about C++'s implementation of iterators or
more core to the concept.
More information about the Digitalmars-d
mailing list