Defying Classification

by Malcolm Tredinnick

Thu 6 Mar 2008

"Taming Effects" -- A Use Of Functional Programming

Posted at 0:24 +1100

I've been overwhelmed a bit by a head cold that sprung into life on Monday and am thinking at the speed of molasses. Turning lemons in lemonade, I spent today catching up on some reading and video watching (interspersed wtih napping). This meant I got around to watching some of the videos from a functional programming seminar given to Ericsson employee's last month, the full list of which are available on Ulf Wiger's blog.

The video I'd like to draw attention to is Simon Peyton Jones' initial talk (he gave two): Taming Effects - The Next Big Challenge. If you've ever wondered why functional programming might be relevant or why there it seems to be gaining more visibility on websites, this talk should provide some food for thought.

Simon is a fantastic speaker, providing you can keep up with somebody who speaks fairly fast. He always conveys a real enthusiasm for what he's talking about, looks very well prepared and manages to present complex things in a very simple fashion. He's one of the people I'm slowly trying to emulate in my own presentations, although I'm miles away at the moment. Simon's best known as one of the authors of Haskell and maintainer of the main Haskell compiler, GHC. However, you don't have to know Haskell to follow this talk; he introduces the necessary terminology as he goes along (that being said, some familiarity with programming is assumed).

One of the things I like in the introduction to this talk is pointing out that functional programming — results driven by data dependencies, rather than execution order — are actually really familiar to us all. It's how a spreadsheet works! This was also brought up in a presentation I referenced last year and I like the analogy a lot. Even when we're using procedural/imperative programming techniques we can benefit from understanding a functional approach to algorithms. This talk expands one aspect of that point: as we work with larger and larger data sets, we need to be more concerned about unintended and even intended side-effects.

Finally, if you're interested in a fairly fast-paced, but excellent introduction to Haskell, I would also recommend Simon's tutorial from last year's OSCON. Part 1 and Part II. It will take a bit of attention, reading of the slides and possibly some rewinding in places, but it's a very nice introduction to the language for programmers who may be familiar with other languages. Plus, who else uses the basics of an X windows manager as their example application?

Topics: technology/algorithms, conferences, software/haskell