Jonathan Müller

Functional Programming in C++

What do ranges, error handling, and I/O have in common? A single functional concept that simplifies complex C++ systems.

Functional Programming in C++
#1about 3 minutes

Understanding functional programming principles in C++

Functional programming is a declarative style that eliminates state to reduce bugs, and C++ allows combining its benefits with imperative performance.

#2about 4 minutes

Building lazy data pipelines with C++20 ranges and views

Use `std::ranges` and views like `transform` and `filter` to create lazy, state-free data processing pipelines that avoid intermediate allocations.

#3about 8 minutes

Solving complex problems with advanced range adaptors

Leverage powerful range adaptors like `cartesian_product` for combinations and `chunk_by` for splitting sequences based on a predicate.

#4about 6 minutes

Creating composable error handling with `std::expected`

Model failures as values using `std::expected` to build clear, functional error handling pipelines with `transform` and `and_then`.

#5about 4 minutes

Separating IO from computation using deferred actions

Isolate side effects by composing IO operations as declarative actions, a pattern that mirrors the upcoming C++26 senders and receivers framework.

#6about 2 minutes

Understanding monads as a unifying composition pattern

Recognize that ranges, `std::expected`, and IO actions are all monads, sharing a common interface for composition with `transform` and `and_then`.

Related jobs
Jobs that call for the skills explored in this talk.

Featured Partners

From learning to earning

Jobs that call for the skills explored in this talk.

Rust and GoLang

Rust and GoLang

NHe4a GmbH
Karlsruhe, Germany

Remote
55-65K
Intermediate
Senior
Go
Rust