A Very Nice Summary of the Best Haskell Features

by Szymon Lipiński

Learning Haskell is hard, but I think it is really profitable. Haskell is not just another boring functional thing. Yea, I know, you can write functional code in Python too. Haskell is just different.

The main great thing about Haskell is that it is so different from the rest of the languages I use, that it really affects the code I write and the way I think about writing and structuring programs.

Below is a very nice summary of why Haskell is worth using.

Haskell gets static typing right

Statically typed languages are often seen as a relic of the past – old and clunky. Looking at languages such as C and Java, we’re used to writing down a lot of information in a program that just declares certain variables to be of certain types. And what do we get in return? Not all that much. Yes, granted, some errors are caught at compile time. But the price is high: we’ve cluttered up the code with noisy declarations. Often, code has to be duplicated or written in a more complicated way, just to satisfy the type checker. And then, we still have a significant risk of run-time type errors, because type casting is common-place and can fail at unexpected moments.

So it isn’t a big surprise that dynamically typed languages are now very fashionable. They promise to achieve much more in less time, simply by getting rid of static type checking.

However, I want to argue that we shouldn’t be too keen on giving up the advantages of static types, and instead start using programming languages that get static typing right. Many functional languages such as Scala, F#, OCaml and in particular Haskell are examples of programming languages with strong static type systems that try not to get in the way, but instead guide and help the programmer.

Haskell gets static typing right.