Monday, August 20, 2012

First Impressions of a budding functional programmer

I have just started learning functional programming. Having spent almost all my time as developer on the JVM (and mostly java), it would have been easier or may be natural to pick up Clojure. I did start on it but somehow could not keep with it. Also I had a burning desire to venture outside the JVM. So I picked up Haskell.
For a brief time now I have been trying to learn Haskell. And boy isn't the language amazing. It's pure functional nature makes you appreciate how the functional paradigm is refreshing different from the imperative world I have been on. Wanted to write down a few impressions, I have had on learning functional programming through the language:

  • The simplicity of the Head and the Tail and how many ways it helps to solve problems
  • The amazing power of recursion and how it can used to solve problems which you never thought could be solved.
  • Higher order functions which allow passing them around and currying which makes problem solving so elegant
  • Type which really govern behavior - Honestly this is something which I am still not sure whether I have wrapped my head around.
  • The thrust in the language to write simple and clean looking code all the time.
These are just a few impressions.
I missed one obvious one obviously. Functional programming reinvigorates your love for math (or for others it might be the first time). I am currently looking at picking up math courses and buying math books.
The journey has just begun and I have a long way to go. If I do something original during this time, you will surely hear from me. Bye for now.