July 29, 2014

Thinking functional

Last time I checked the date, I got to know that my summer vacations are soon ending. I wanted to do something different in the remaining time. So it came to my mind that why shouldn’t I delve into functional territory? All the languages I have learnt so far focused on imperative/object-oriented programming paradigm so this idea seemed to be good enough. But the problem I faced was choosing one. There are a literally a lot of them; mostly categorized into

  • Haskell
  • ML family
  • Lisp dialects

I browsed a lot of Stack Overflow, Reddit, Hacker News threads but couldn’t decide which one should I commit to? I didn’t want to get demotivated from learning functional paradigm just because I chose a language which wasn’t too well accomodating for a noob at functional programming. Every language had its proponents (or say fanatics. P.S.: I’m not saying it’s a bad thing to evangelize what you love). The most popular ones seemed to be Haskell, Clojure, Scala, F# and OCaml. Haskell was too pure and acadamic for me. Although trying a pure language which doesn’t offer flexibility for using imperative paradigm in your code and force you to be functional would have been good too. F# requires .Net framework and others were too specfic for certain industrial usecases.

After carefully going through pros and cons of each option, I have settled on Clojure and I’ll post an update about how it turned out for me.