World Congress 2024 Aug 20, 2024 Session details

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

Arno Schoedl

An analysis of a million lines of code reveals a fundamental flaw: C++ iterators conflate elements and borders. Discover how strict semantic separation eliminates ambiguity in modern ranges.

Pause
Mute Enter Fullscreen
#1 about 2 min

The history and dual nature of iterators

Traditional iterators inherently combine pointer semantics and logical segment bounds into a single ambiguous construct.

#2 about 2 min

Simplifying code readability with modern standard ranges

Adopting modern range syntax removes redundant boundaries and forces predicate checks to logically align.

#3 about 2 min

Separating projection and search with range adapters

Applying lazy transformation adapters separates complex structural projections from the underlying search algorithms.

#4 about 4 min

Issues with base function and adapter transformations

Reversing adapter transformations causes structural ambiguity when bounds no longer map to fixed memory elements.

#5 about 4 min

Resolving reverse adapter ambiguities with segment boundaries

Since reversing range parameters alters the index offset, simple dereferences fail to find original elements.

#6 about 3 min

Replacing iterators with explicit elements and boundaries

Introducing completely separate base interfaces for values and boundaries fully solves order permutation errors.

#7 about 4 min

Analyzing empirical iterator usage across large codebases

Auditing production application logic confirms developers rarely utilize actual border lookups outside edge scenarios.

#8 about 4 min

Designing strict interfaces for borders and elements

Refactoring data interfaces into purely nullable entities clarifies standard search intent without referencing useless boundaries.

#9 about 2 min

Adopting a strongly typed semantic range library

Moving standard abstractions to custom typed libraries enforces semantic correctness during everyday validation operations.

#10 about 4 min

Addressing invalidation and boundary logic inside maps

Reviewing discrete boundaries helps integrate mathematical set logic safely alongside data container invalidations.

Matching moments

3:11 min

Permitting variable references and unsafe code in iterators

Ambesh Singh +1 · LIVE

4:10 min

Filtering and transforming ranges with lazy evaluation views

Jonathan Müller Jonathan Müller · WWC 2025

2:30 min

Overriding loops with ranges and stepping

Christian Woerz · LIVE

55 sec

Summarizing range composition patterns and standard library algorithms

Jonathan Müller Jonathan Müller · WWC 2025

6:23 min

Modernizing legacy programming architectures using iterative core guidelines

Bjarne Stroustrup · WWC 2022

1:29 min

Addressing iterative code generation and developer challenges

Upcoming sessions on this topic

Open session

World Congress 2026 North America

When Humans Stop Writing Code: Rethinking Languages, Compilers, and Responsibility

Simon Auer

Organizer of flutter vienna meetup and CEO of marqably

Simon Auer
Open session

World Congress 2026 North America

Designing APIs That Survive AI Agents at Scale

Phani Pendurthi

Mastercard, Principal Software Engineer

Phani Pendurthi
Open session

World Congress 2026 North America

There's no dark factory without better software verifiers

Dexter Horthy

Co-Founder, HumanLayer

Dexter Horthy
Open session

World Congress 2026 North America

Agents Can't Iterate Against Tests That Lie

Rocky Warren

Senior Staff Software Engineer at Clipboard

Rocky Warren
Open session

World Congress 2026 North America

Building Stuff with GenAI - The Open Minded Workshop beyond OpenAI

Andreas Erben

CTO for Applied AI and Metaverse at daenet

Andreas Erben
Open session

World Congress 2026 North America

Secure-by-Inclusion: Preventing Accessibility Barriers from Becoming Security Vulnerabilities

Radostina (Ina) Tsvetkova

Norwegian Directorate of Labour and Welfare (NAV), Senior Advisor in Digital Accessibility and Inclusive Design

Radostina (Ina) Tsvetkova