HaskellFun

Functional Programming

I have been learning and using functional programming (aka FP) paradigm at work. Nowadays, most of modern programming languages have adopted FP as well as imperative programming paradigm and object-oriented programming paradigm as a whole. Likewise, there are many handy fp libraries in the nodejs world in use. And I simply write easy Monads like Result and Option using javascript too. Basically I can claim that I can do FP.

Pure FP

Why I still fancy learning a FP right now? Because the modern programming languages I am using are sort of hybrid where multiple paradigms exist for use. I grew up as an imperative programmer like many of us then adopter for OO. That exposes an inclination to always divert to use non-FP to fix problems if using those languages. Hence, what I am looking for is a pure FP programming language.

The Haskell

Haskell is known as the pure FP programming language by developer communities for long while and the most uncomfortable to those who are imperative guys and OO guys because its purity. You are advised not to use if expression in Haskell, it does not have for loop and you must consider to use recursion as such.

Moreover, the tooling around Haskell is awesome. I notice that Haskell has ghcup which is a rustup-like bootstrap tool out there.

Other Pure FPs

Back at work, there are development teams that are using Clojure, which is a pure FP languages on top of JVM and a Lisp dialect.

Erlang, Elixir and Gleam on the OTP platform.

OCaml, Reason and F# those breeds of ML world are intrigue too.

The reasoning is that as long as I get used to the pure FP idioms and I am able to create some small APIs, utilities using Haskell, at the time it will be easier for me to pick up another similar ones quickly because they share most of the idea.

Begin with something…

The main resource I am using is the free video course Haskell for Imperative Programmers as well as other sources. My plan is to blog what I have learnt based on this course along with other resources. Shamelessly I will use the structure of this course then bite the content piece by piece in blogs. This approach can benefit me from grasping firmly the knowledge and potentially it might serve others for good.

Let’s get started…