Cuddly, Octo-Palm Tree: Review: Why FP Matters (Hughes)

submited by
Style Pass
2021-08-19 03:00:09

A few years ago, I came across the blog post Why Why Functional Programming Matters Matters. It was a major factor in my decision to invest heavily into learning functional programming, so it's safe to say it's had a huge impact on my development as a software engineer. In fact, I highly recommend reading everything Reginald Braithwaite has ever written; I can't claim to have read it all, but I can say that I've never regretted any minute spent doing it.

Today, however, I want to talk about the paper that blog post talks about. It is titled "Why Functional Programming Matters", and if you have never read it, you should go read it right now. Don't worry, I'm not going anywhere. As a piece of static text, I have all the patience in the world.

As a brief summary, the paper argues that functional programming yields better programs because it adds constraints on programs, which in turn lets the programmer make assumptions about program segments (i.e. functions), which increases reasoning ability, and thus composability, and therefore makes it possible to use new types of "glue" between code segments, thereby improving code reuse. I'm not going to repeat all of the arguments, you just read them. (Seriously, go read the paper if you haven't.)

A couple weeks ago I decided to reread the paper, to check if everything I've learned in the past dozen years since I first read it would allow me to gather any new insight. I decided that a superficial reading would not be enough, and that to force me to really carefully read everything I would reimplement the code samples. I also thought this would be a nice test of how Clojure holds up to Hughes' definition of functional programming.

Leave a Comment
Related Posts