So, long story short. This series of posts was not intended to be a diatribe against all forms of code that are not functional. Nor a rallying call for Pivotal Labs to abandon its traditional platforms in favor of writing everything in Haskell and Yesod. Instead, it was meant to begin with a playful poke at things we consider sacred, some exploration of the benefits of functional programming and what we can learn from emerging technologies and ideas. I feel that Pivotal has always been ahead of the curve in its technology choices and that it would be wise for us to give this crazy old concept a bit of a try.
Unfortunately: I’m leaving Pivotal. So instead I’m going to link you to some interesting articles and blog posts on the subject that have said everything I could hope to say only much better.
Firstly this paper Why functional programming matters is a great introduction to the subject of FP in general. It speaks about FP in terms of the benefits of first class functions and how they enable composition and modularity. Out of the several (somewhat new) FP languages available Clojure is the one that interests me the most. This great article (by former Pivot David Jacobs) makes an excellent case for applying the language to production problems.
As typically Ruby developers, what FP techniques do we have available and what can we learn? Functional Eye for the Ruby Guy is a great blog post on some of the new features in ruby 2.0, including a look at lazy sequences. This talk demonstrates ways of writing more functional Ruby code, you’re probably using many of these suggestions already! My favorite of all is this Destroy all Software screen cast on how writing ruby code in a more functional way makes it easier to test.
So that’s it. I’ve found some of these ideas to be quite eye opening, I hope you’ll find them as useful as I.
About the Author