In part 3 of the Advanced Functional Programming lecture series, Dr. Lämmel focuses on the domain of language interpretation as a method of understanding some important functional programming techniques. As a side effect, some basics of programming language theory are also informally presented.
More specifically, this lecture develops an interpreter for a simple functional programming language that contains Booleans, natural numbers, lambdas, and recursive lets. The interpreter is actually developed in a stepwise manner, which is why the lecture
is called "Evolution of an Interpreter."
In each step, another construct is added and the impact of the extension onto the interpreter is analyzed. In this manner, several interesting programming techniques are exercised. For instance, the Maybe type constructor is pervasively used for dealing with partiality, and Haskell's fixed point combinator is used to model the semantics (i.e., interpretation) of recursive bindings.
This lecture also prepares us for some more advanced subjects. For instance, the next lecture in this series will cover the intriguing subject of monads while using interpretation as the application scenario. Soon, generalized folds (or bananas, according to Erik Meijer) will also be discussed (the folds will traverse abstract syntax trees as opposed to lists).
Thanks to Ralf for providing another excellent lecture!
Earlier lectures here.
Related Blog Post and Code: