Bartosz Milewski: Haskell -- The Pseudocode Language for C++ Template Metaprogramming (Part 1)
Channel: CppNow
Date: 29/10/2013

C++ template metaprogramming is hard to use, analyze, or debug. The main reason is that compile-time C++ is a functional language with abominable syntax. The key to successful metaprogramming is to become familiar with functional programming and develop a language to describe C++ metaprograms in pseudocode. Such a pseudo-code language already exists and is called Haskell. I will introduce Haskell in parallel with equivalent C++ meta-code. I will show how to read and write complex metaprograms in C++ using Haskell. Finally, I will show what a monad is and how to use it to explain "runnable templates" in C++.
---

*--*

---