Oyp40vyuoosdzhv6u3i0
SkillsCast

Why Iterators Got It All Wrong — and what we should use instead

22nd August 2017 in London at CodeNode

There are 2 other SkillsCasts available from Why Iterators Got It Wrong

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, no. 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.

Thanks to our sponsors

Why Iterators Got It All Wrong — and what we should use instead

Arno Schödl

Arno is one of think-cell’s co-founders and Technical Director. He is responsible for the design, architecture and development of all their software products. He oversees think-cell's R&D team, Quality Assurance and Customer Care. Before founding think-cell, Arno worked at Microsoft Research and McKinsey. Arno studied computer science and management and holds a Ph.D. from the Georgia Institute of Technology with a specialization in Computer Graphics

SkillsCast

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, no. 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.

Thanks to our sponsors

About the Speaker

Why Iterators Got It All Wrong — and what we should use instead

Arno Schödl

Arno is one of think-cell’s co-founders and Technical Director. He is responsible for the design, architecture and development of all their software products. He oversees think-cell's R&D team, Quality Assurance and Customer Care. Before founding think-cell, Arno worked at Microsoft Research and McKinsey. Arno studied computer science and management and holds a Ph.D. from the Georgia Institute of Technology with a specialization in Computer Graphics