On 6/9/15 7:38 PM, Jonathan M Davis wrote:
On Tuesday, 9 June 2015 at 22:37:32 UTC, Andrei Alexandrescu wrote:
On 6/9/15 3:11 PM, Jonathan M Davis wrote:
And containers are really the main place, I think, where iterators
actually do better than ranges.
I think iterators would need to add huge value to warrant addition. --
Andrei
I don't disagree. I think that we should stick with ranges. I just think
that this is one of the few areas where ranges are actually worse than
iterators, whereas in most other areas, they're better. The result is
that some of the idioms that are used with iterators in C++ become
increasingly unwieldy with ranges - finding an element and removing it
from the container is probably the simplest example.
What's needed is a simple way to refer to exactly one element. I solved
that problem in dcollections.
-Steve