Functional Programming in C++

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, and separating IO from computation. In the end, we’ll even cover the M-word.

See also