I’m preparing an application for a faculty position at a university in the US, and am in the process of writing a teaching statement. It’s at a college with motivated undergraduates, small classrooms and a very newly founded CS program, so I wanted to say something about offering a first year course in Haskell as an introduction to programming.
I wondered if anyone here had experience with universities that do this (also for FP languages more generally - e.g. MIT and Scheme) and could provide advice on how it has worked for them (either as teachers or students), and what might be good arguments that this is a good didactic approach.
The Australian National University does this. Here is its entry on Programs & Courses: Programming as Problem Solving - ANU . You may want to reach out to the course conveners (though be aware that it’s nearly exam season and they might be quite busy).
One benefit is that it starts students on a level playing field. When I TA’d the course years ago I saw students with strong mathematical skills but limited hands-on computer skills get a handle on the material and pass with good marks. Similarly, students with previous imperative programming experience get a new challenge to chew on, which I think is a good thing for university education to offer to ambitious students.
George Wilson gave a good talk at YOW! 2019 about why strongly statically-typed lazy pure FP is a good fit for first-semester, first-year CS education (with references to strengths and weaknesses of SICP and HTDP along the way): https://www.youtube.com/watch?v=nAdX5w-IHLY .
For later year stuff, you might want to try reaching out to UNSW (used to have some prominent Haskellers), UQ (where someone from the Queensland FP Lab helped them rebuild their functional and logic programming course) and possibly Griffith University.
I don’t have a whole lot to add over what @jackdk said, we were both tutors for the same course at ANU at different times.
I will add though that a pure functional language allows students to step through the execution of programs without needing to also keep track of state, which makes reasoning about, and debugging, programs much easier (once you can convince them to actually pull out a pen and paper or a text editor and copy and paste the previous line of code, and apply the next function definition which matches). I also find that people who do this end up with a much better understanding about the performance of their Haskell programs - when you ask students to implement concat and they end up with the left associative version, they can step through and see how much extra work they need to do. They might not see the O(n^2) vs O(n) difference, but when they have to execute it all by hand, they see how much extra work they need to do.
I also think having a statically typed language which allows people to think about their designs before thinking about the implementation is a valuable thing to have, but initially they will also struggle because they just want to write the program, they don’t know what the program they want to write is going to look like.
ANU’s got many years of different assignments from over the years that do a good job giving students fun programs without needing the types already written, just needing the definitions filled. Usually they have some fun graphical representation of what they’re building too. I wrote one assignment for the course years ago which taught several different compression algorithms - run length encoding, the burrows wheeler transform, Huffman coding and LZW, which the more interested students really enjoyed. I’d love to rewrite the backend of that assignment to use more efficient serialisation of their solutions, for some reason I didn’t do the obvious binary encoding of the Huffman coding
I teach functional programming at my college to my peers. Mostly idris2. We follow this GitHub - stefan-hoeck/idris2-tutorial
tutorial and exercises i come up with on the spot
( for anyone that doesnt know yet, idris is like an attempt at next gen haskell, idris2 is a rewrite of idris 1 )