January 27, 2018
By: Simon Chappell

Vaguely Functional

Stegastein, Aurland, Norway by Rob Bye Stegastein, Aurland, Norway by Rob Bye

I'd like to say that this is all meticulously planned out. The reality is that I'm just following my instincts. I have a quarter of a century of professional development experience. I know a thing or two about programming, but most of that was with procedural and object-oriented languages. That said, I have been increasingly drawn to functional programming, style and languages, for many years now.

I love so many of the aspects of the functional paradigm. Immutable values mean that testing is a breeze, because values stay the way that you set them and there is no fear that something else will change them behind the scenes. Side-effect free functions ensures that your tests are simpler because the return value can only ever depend on the values that it's given. First-class functions certainly take a while to get used to, but after a while you'll be passing functions around freely. Recursion is another brain-bender, but stick with it and it'll click.

Am I brave enough to address the question of which languages are functional? Yes and at the risk of all the Haskell boys and girls hating me, I'm going to say that I personally accept any language in which it is possible to code within the functional paradigm. Some languages make that easier or more challenging, but if you can code functionally in it, then I'll call it functional and will likely talk about it here at some point.

Tags: Administrivia