Functional Programming in C++

Jonathan Müller

⏱ 90 minute session
beginner
intermediate
11:00-12:30, Thursday, 3rd April 2025
Functional programming is a declarative way of writing programs by composing functions. In many situations, this can lead to code that is easier to write and understand and less error-prone. However, it requires a shift to a more functional mindset. This talk gives an introduction to functional programming in C++ using the modern standard library. We will cover algorithms using std::ranges, composable error handling with std::optional and std::expected, algebraic data types, and separating IO from computation. In the end, we'll even cover the M-word.
🏷 functional programming
🏷 algorithms
🏷 ranges
🏷 error handling

Jonathan Müller

Jonathan is a Software Engineer at think-cell. There, he is responsible for maintaining think-cell's core libraries, which include a custom range library, a fast and convenient JSON parser, and many other utilities and data structures to write elegant C++ code. Before working at think-cell, he wrote many useful open-source C++ libraries. Jonathan is also a member of the C++ standardization committee, where he serves as the assistant chair for std::ranges and is a frequent conference speaker.