Meet Andrzej Filinski - our world expert on monads in programming
Associate Professor Andrzej Filinski teaches Semantics and Types, and he also feels strongly about educating functional programmers about the use of monads in programming.
"I worked for many years on programming with monadic effects, which is a systematic way of adding nominally "impure", but often very convenient, language features to "pure" functional programming.
What courses are you teaching at present?
- My main course is "Semantics and Types". That's an introduction to programming-language theory, which covers formal reasoning about both individual programs (for example, showing that a particular optimization is actually meaning-preserving) and whole languages (for example, showing that all programs that pass a static type check are actually safe to execute). I also co-teach "Extreme Multiprogramming", in which I cover the CSP theory track.
What are your current research interests?
- I'm working mostly on data-parallel functional programming, which is a key research area of the HIPERFIT Center at DIKU. We are developing new languages that are easy to program in and reason about, but at the same time lend themselves naturally to being executed on massively parallel hardware, such as GPU cards. Needless to say, this work relies heavily on concepts and techniques from "Semantics and Types".
Which of your research results are you the most proud of?
- Before I got interested in parallelism, I worked for many years on programming with monadic effects, which is a systematic way of adding nominally "impure", but often very convenient, language features (such as mutable state, exceptions, or back-tracking) to "pure" functional programming. If you do this in the traditional way with monad transformers, everything remains mathematically correct, but your programs slow down in proportion to the number of features that you want to support - even if you only use those features very rarely. However, I was able to show that one fixed, "universal" monadic effect (so-called delimited continuations) can actually mimic all other monad combinations, no matter how complicated; in other words, you only need to pay the overhead once and for all.
- I think this result has changed the way many researchers now think of monads, but I still too often hear functional programmers say that writing a cleanly layered monadic program was too inefficient, so they just hacked up some ad hoc alternative - which probably ended up being both more error-prone and less efficient. I guess there's still some education to be done there.