Posted by Jesper on July 17, 2024
Back in January of this year, I had the honor of hosting the `FP Dag’ – also known as the Dutch Functional Programming Day – here in Delft. Apart from several entertaining and thought-provoking talks, we also had a discussion around functional programming in education. During this discussion, I gathered input from the participants on four questions:
- What courses about functional programming are we teaching in the Netherlands?
- Which concepts are we teaching in these courses?
- Which concepts should we be teaching (more)?
- How could our FP education be improved?
Recently I stumbled upon my notes from that meeting and thought it would be interesting to share them, so here you go.
What FP courses are we teaching?
Here is a list of all the courses that people mentioned, plus a few more that I found afterwards. I only included courses for which I could find some evidence that they actually exist, like a course description. Universities make basic information frustratingly hard to find, so I might have missed some.
TU Delft
- Concepts of Programming Languages (2nd year, using Scala)
- Functional Programming (3rd year, using Haskell & Agda)
- Formal Reasoning about Software (MSc, using Coq)
- Advanced Functional Programming (MSc, using Haskell)
Radboud Universiteit
- Logic and applications (1st year, using Coq)
- Functional Programming (2nd year, using Haskell)
- Type Theory and Coq (MSc, using Coq)
- Program Verification with types and logic (MSc, using Coq)
University of Groningen
- Functional Programming (2nd year, using Haskell)
TU Eindhoven
- Functional Programming (3rd year, using Haskell)
- Capita selecta Advanced Functional Programming (MSc, using Haskell)
Universiteit Twente
- Functional Programming (3rd year, using Haskell)
Utrecht University
- Functioneel Programmeren (2nd year, using Haskell)
- Concurrency (2nd year, using Haskell)
- Talen en compilers (3rd year, using Haskell)
- Advanced Functional Programming (MSc, using Haskell and Agda)
Universiteit van Amsterdam
- Theory of functional programming
- Functional Programming (using Haskell)
Vrije Universiteit Amsterdam
- Object-Oriented and Functional Programming (2nd year, using Scala)
- Equational programming (3rd year, using Haskell)
- Logical Verification (MSc, using Lean)
Open University
- Concepten van programmeertalen (2nd year, using Haskell)
- Functioneel programmeren (2nd year, using Haskell)
The main languages used seem to be Haskell and Scala, with a mix of Coq, Lean, and Agda for more verification-focused courses.
Which concepts are we teaching?
Basic FP techniques
- Lambda calculus
- Referential transparency / purity / immutability
- Recursion
- Currying and uncurrying
- Higher-order functions
- Static types and type inference
- Parametric polymorphism
- Algebraic datatypes and pattern matching
- Type classes
- Functors and monads
- Laziness
- Property-based testing (QuickCheck)
Advanced FP techniques
- Datatype-generic programming
- Embedded domain-specific languages
- Task-oriented programming
- Uniqueness types
- Streaming and lazy IO
- Lenses
- Continuation-passing style
- Array programming
- Metaprogramming
- Fusion
Program verification
- Dependent types
- Curry-Howard correspondence
- Equational reasoning
Programming language theory related to functional programming
- Parser combinators and generators
- Homomorphisms
- Folds and algebras / recursion schemes
- Initial and final algebras
- Lambda encodings of data
- Lambda encodings of objects
- Category theory
- Combining static and dynamic typing
What concepts should we be teaching (more)?
- Property-based testing
- Generic programming
- Continuation-passing style
- Effect systems and free monads
- Domain modeling using types
- Reasoning about performance
- Interacting with databases
- Build systems
- Concurrency
- Functional reactive programming
- Combining imperative and functional systems
Out of these, I’m especially interested to teach effect systems, domain modelling, concurrency, and FRP (and learn more about those topics myself!).
How could functional programming education be improved?
- Easier installation of compilers and IDEs on university PCs
- Better error messages
- Better tools for automatic grading and feedback
- Sharing curricula, lecture notes, exercises, …
- Having more use cases from industry
So there you have it: a crowdsourced overview of some things we are teaching and some more things we could be teaching. I don’t have a proper conclusion, but I hope this will be interesting and useful for people studying and teaching functional programming around the world. It goes without saying that I think teaching functional programming is great and we should be doing even more of it! Speaking of which, I certainly got some inspiration for my new course on Advanced Functional Programming which I will teach for the first time in Q4 of the upcoming academic year.
If you have your own ideas or additions, let’s discuss on the Fediverse, or feel free to send me an email!