Written by Bartosz Milewski | 9/5/12 11:32 PM

I gave a talk about Functional Patterns in C++ at the meeting of the Northwest C++ Users Group. It was a long talk, so the video is split into three parts. Even though it was a presentation for C++ programmers, I took a lot of inspiration from Haskell, but without the mathematical background. From a C++ programmer's point of view, Functors, Applicative Functors, Monoids, and Monads are just patterns of code -- useful abstractions. I've been told that my explanation of a monad using the example of asynchronous API made a lot of sense and provided the right intuition for a lot of C++ programmers. Too bad C++ notation makes all those patterns barely usable. The hope though is that the C++ Committee will consider adding some syntactic sugar to the next version of C++, following the example of F# and C#. One can always dream...

Here are the links to the videos:

- Part 1. Type Constructors, Functors
- Part 2. Currying, Applicative Functors
- Part3. Asynchronous API, Monoid, Monad

The slides have more recent corrections and enhancements compared to the videos.

You can also have a look at the source code.