Why Iterators Got It All Wrong — and what we should use instead
Arno Schödl - 9 months ago
You understand iterators, right? How would you describe them? "Iterators are used to point into sequences of elements." Sounds good? More recently, the concept of ranges has been introduced to mean anything that exposes iterators. In particular, ranges include range adaptors for lazily transforming or filtering sequences of elements, and they, too, have iterators. All good? Unfortunately, not. The iterator concept, which we have been using since the advent of C++, is fundamentally flawed. In particular, some iterators must behave differently depending on whether they are meant to point at an element or at a boundary between elements. So elements and boundaries are really two distinct concepts. In this talk, I will convince you that the problem is real and has practical implications, make a proposal on how to fix it and show how the solution not only fixes the problem but makes for clearer code and prevents mistakes.
Jobs with related skills

Software Developer C++ (m/w/d)
ROSEN Technology and Research Center GmbH
·
5 days ago
Osnabrück, Germany
+1
Hybrid

Senior Code Module (.NET) Engineer (m/f/x)
Dynatrace
·
18 days ago
Linz, Austria
Hybrid

Senior Hardware Engineer (m/w/d)
AVT STOYE GmbH
·
30 days ago
Köln, Germany
Hybrid

Software Developer Qt/C++ (m/f/d)
Safetec GmbH
·
31 days ago
Heidelberg, Germany
Related Videos