A Very Nice Summary of the Best Haskell Features

Learning Haskell is hard, but it is really profitable. Haskell is not 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.

2 responses

  1. Hakell might get static typing right, i doubt it but i will give you the benefit of this, haskell gets almost everything else wrong. separating program segments based on dirty or clean code, no ability to chang variables at run time to stop bugs based on someones misconceptions of what programming really is , need i go on, oh ok then, stupid backwards coding style because it originated from lisp, stupidly having to constantly call other functions because you have the ability to use higher order functions but dont have the ability to create them yourselves cause you dont have access to the machine or variables you need to modify to get at the parts of the machine you need to so you can create your own code.

    anyway haskell is crap C is the only way. Go C..

    regards
    anti haskell pro C hacking hacker hackfest

  2. The separation of the code, so one function cannot have any side effects, and other can, is a very good separation. This is a great thing for the compiler, so the pure function can be inlined, and great for programmer, who knows that testing this is trivial.

    C has many other different problems, just different ones from Haskell.

Leave a Reply

Your email address will not be published. Required fields are marked *