[Haskell-cafe] teaching functional programming at work

Warren Harris warrensomebody at gmail.com
Sat Jan 3 20:28:20 EST 2009

I am seeking suggestions from the haskell cafe for teaching functional  
programming concepts to colleagues at work. I'm currently working on a  
project using ocaml and functional programming techniques, and am a  
lone ranger at my workplace when it comes to this sort of thing (we  
are primarily a python shop). However there seems to be a growing  
curiosity in functional programming, and I think there's a lot to be  
learned from from it whether one chooses a functional language for  
their next big project or not.

But I'm a practitioner, not an academic or lecturer, and although I  
find the idea of helping my colleagues understand these concepts to be  
an exciting prospect, I'm not really sure where to start in terms of  
materials or overall direction. My sense is to form a study group  
(perhaps going through Real World Haskell together), but I'm a little  
afraid of assembling people together for a "now what?" experience. So  
my first question is whether this is even a good idea?

Some things I think would be useful to get across are:

- fp is more than just an exercise in avoiding assignment statements  
-- why a smart programmer should care?
- reading knowledge of ocaml and/or haskell (even syntax, precedence  
and infix operators can be an initial stumbling block)
- core concepts: type classes, proper tail recursion, higher-order  
functions, folds, combinators, monads, monad transformers, arrows
- evidence that concise expression can lead to less bugs / better  
maintainability (hard to prove, but perhaps a sense can be conveyed)
- relationship between types / theorems / programs / proofs and why  
this is important for the future of software

Regarding this last point, my own sense has been that by leveraging a  
powerful type system such as found in ocaml or haskell has allowed me  
to achieve things I never would have been able to without it (or at  
least would have ended up with a much less elegant implementation and  
much more debugging) but many seem to find types to be either an  
impedance to getting things done quickly, or at best irrelevant. I  
know this is for the most part a religious war, but I would like my  
colleagues to arrive at their opinion from an informed perspective,  
which means learning that there's more to typeful programming than  
what is presented by java or c++.

Finally, any comments on how to make the learning experience fun,  
engaging, and a positive experience would be greatly appreciated.


More information about the Haskell-Cafe mailing list