08
Aug 13

A few brief thoughts on “Dysfunctional Programming”

Here are a few random thoughts on @SamirTalwar‘s post “Dysfunctional Programming” – learning functional programming in your favourite language (go read it now, I’ll wait for you).

This is an excellent technique to understand the underlying concepts of a new programming “paradigm”. Because the new “paradigm” (*) is not about the language per se, it’s about a new way of thinking about problems, code & potential solutions. A new paradigm presents a new set of constraints and opportunities to the developer. Most of the time, the constraints are pretty easy to emulate (as Samir describes eloquently), sometimes they just require discipline. Plus, you can take advantage of these new opportunities by emulating them in your language of choice (e.g. starting to emulate polymorphism with function pointers in plain C or, as Samir showed, implementing a map function for an immutable list class) (**).

A great session at SoCraTes 2013, I enjoyed it a lot, and will pass this on in an internal workshop at extragroup GmbH.

(*) Most likely, the paradigm isn’t new per se (witness the latest “hype” – functional programming) – it’s just new to you – or, if you’re old enough, you’ve accumulated so much crap in your head that you purged your knowledge about the paradigm over the years anyway.

(**) I have fond memories of moving from structured programming to oo programming way back when using a Burroughs B20 with Pascal (yes, this was considered a leading edge language at that time). Talk about an old dog.