Writing

Software, projects & software projects

Functional Programming Course

At Otto two colleagues and me are teaching a course on functional programming. The course targets students and apprentices. This year marks the fourth year we teach it over the next few Fridays. Before we used Scala for programming examples and exercises. This year we reworked all our materials to use Clojure instead.

We wanted to focus more on the fundamentals of functional programming (FP) and less on the language itself. Clojure’s dynamic nature helps us by getting rid of a huge chunk of non-functional features. Namely a static type system, inheritance, classes, traits and generics. These aren’t bad things per se. But they get in they way when you want to teach students about pillars of FP: Immutability, recursion and functions a first-class citizens.

Students need to be able to pick-up the language within a few hours. The course only lasts four days. We want our participants to be productive fast. Clojure has a very small syntax and an approachable standard library. Less footguns to hurt yourself. Fast feedback cycles and a straightforward CLI round things off.

I’m having lots of fun rewriting our exercises in Clojure. Excited for the course and how well our decision bodes with the students.

Other posts