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).
Enjoy. Learn.
Thanks to Ralf for providing another excellent lecture!
Earlier lectures here.
Related Blog Post and Code:
http://professor-fish.blogspot.com/2010/08/bunch-of-interpreters-using-cpp-and.html
Welcome to another series of
Welcome to another installment of
Welcome to another installment of
“The Expression Problem is a new name for an old problem. The goal is to define a datatype by cases, where one can add new cases to the datatype and new functions over the datatype, without recompiling existing code, and while retaining static type safety (e.g., no casts).” – Philip Wadler
After a long day of sessions at
“The biggest problem with programming is that we don’t agree on what the problem is”, says
A group of us gathered after a long day of language sessions at
Recently, I got the chance to spend a few days at the
Welcome to another installment of