~/talk

Functional Programming in Modern C++: The Imperatives Must Go!

Talkat ACCU 2023 · 2023-04-19..04-22· [c-and-cpp, functional-programming]
slides:none on file

Argues that functional programming is already inside modern C++ and demonstrates concrete techniques: std::optional and std::expected with monadic bind/and_then, a fmap via std::transform pattern and a lift macro for picking overloads, plus lazy composition using C++20 ranges and views. Shows a real counting trick implemented with zip/tail then inner_product, contrasts a 6-line shell pipeline with verbose imperative C++, and warns about dangling views, compile-time cost and when to prefer imperative code for performance or easier debugging.

AI-written summary · about

  1. 0:00Welcome
  2. 1:48What is functional programming
  3. 8:14History of functional programming
  4. 13:14Why FP matters
  5. 20:22Easy FP patterns in C++
  6. 25:42Working with optional
  7. 36:21Chaining operations with lifting
  8. 41:46Monadic continuations with optional
  9. 51:04Error handling with expected
  10. 58:40C++20 ranges for declarative code
  11. 1:09:21Word frequency problem
  12. 1:13:19Trade-offs and debugging
  13. 1:25:34Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.