do not click

Meeting C++ 2026   |  Online   |  Training   |  Books   |  Survey   |  Job fair   |  Advertising   |  Jobposting   |  Login

Meeting C++ 2026 - The Algebra Behind Great C++ APIs

Conference | Live Schedule | Talks | Get your ticket | Slides | Set your timezone

The Algebra Behind Great C++ APIs

Join session

Dušan Jovanović

On Day 1 at 13:15 (CET/Berlin) in Track C [Jade Room and online]

std::chrono is widely called a masterpiece of API design, but why? The secret isn’t constexpr or templates. It’s mathematics.

Add a duration to a time point, and you get a time point. Subtract two time points, and you get a duration. Add two time points and the code won’t compile! That is no accident: it follows a centuries-old mathematical structure, correctly enforced by the type system. And once you learn to see it, you start noticing it everywhere: in raw pointers, in money, even in a Git rebase.
This talk breaks down what makes <chrono> so hard to misuse and so easy to extend. We will look for ways to apply the same idea in places outside the standard library. The goal is to build intuition in API design and apply mathematical concepts to our domain types, leading to a safer codebase.

No mathematical background required. Just bring the C++ APIs you wish were harder to get wrong.

Please login to comment

Copyright Meetingcpp GmbH Imprint Privacy Policy