Skip to content

Why Iterators Got It Wrong and A Foreign Function Interface Generator for C++

Photo of Phil Nash
Hosted By
Phil N. and 2 others
Why Iterators Got It Wrong and A Foreign Function Interface Generator for C++

Details

I'm pleased to welcome Arno Schödl, Technical Director of think-cell, and Jonathan Coe this month.

We're also grateful to Think-cell for sponsoring food and drink at this event.

(As before, please also register on the SkillsMatter page) (https://skillsmatter.com/meetups/9831-c-plus-plus-august-meetup)

https://secure.meetupstatic.com/photos/event/d/d/5/8/600_463916664.jpeg

think-cell are looking for C++ Developers (https://www.think-cell.com/career)

Agenda:

18:30 pre-session networking/ drinks and think-cell sponsored food and drinks!

19:00 Phil Nash (https://www.meetup.com/CppLondon/members/48127252/) << "Hello World"

Brief introduction and raffle for a JetBrains license

19:10 Jonathan Coe (https://www.meetup.com/CppLondon/members/187960610/) << "FFIG a Foreign Function Interface Generator for C++"

It uses libclang and (lightly) annotated C++ to generate interfaces in Python, Ruby, Lua...

It's an open source project in early development, I'll show how it works, how it can be extended and how object lifetime management is handled.

19:50 Arno Schödl (http://think-cell.com) << "Why Iterators Got It All Wrong — and what we should use instead"

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.

---

About the speakers:

Jonathan is a mathematical developer using modern C++ and Python. He has worked in academia and the financial and energy industries. He's been a participant in the C++ standards committee since 2014.

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

Photo of C++ London group
C++ London
See more events
Skills Matter | Code Node
10 South Place EC2M 2RB · London