Bye bye Python; Enter Haskell

Bye bye Python; Enter Haskell

The only ‘programming language’ a computer understands has two ‘commands’ - 0 and 1. That language also happens to be the one that human programmers have the most difficulty with, and so the need arose for human-like languages. However, it could never be forgotten that all codes developed in human-like abstract languages had to be translated into 0s and 1s at the end of the day.

The proliferation of programming languages over the last 50 years was related to balancing the above two aspects. At first, programs were written in assembly language, which was nothing but Anglicized machine code. When computers became larger and programmers felt a bit more ‘wasteful’, languages like C and PASCAL came in. It took another 30 years for computers to be large enough to allow domination of scripting languages (PERL, python, ruby, PHP) over C and C++.

The computing hardware world went through another major transformation over the last five years to support another upgrade in programming paradigm. It is the introduction of many cores. The older languages like C or C++ cannot be programmed seamlessly, while taking advantage of many cores. That is where Haskell, a functional language, can help.

Please note that we are not saying that multi-cores cannot be programmed in C/C++ or programmed efficiently in C/C++. Haskell will make it easy to write scalable code without significant loss in speed. The transformation we are suggesting is similar to the one from assembly language to C. Most programmers knew that assembly codes were efficient, but those, who continued to write assembly language code, did not manage to build very complex applications.

Here we will add links to few Haskell resources, if you are interested to get started.

A. SO Comment: The best place to start with is to read the first comment in this stackoverflow exchange.

B. Book ‘Learn You a Haskell’: freely available online

C. Book ‘ Real World Haskell’: freely available online

D. Haskell 99 problems: link

E. Project Euler problems: link (I am starting to think that Euler was a smart kid given how he managed to impress both bioinformaticians and Haskell programmers. Was he from Harvard?).

F. GHC compiler: Download

G. Haskell online manual: Link

H. A set of 13 video lectures on functional programming: Link

and last but not the least,


An introduction to Monads !!

Enjoy !!!


Here is a comparison of Python vs Haskell. Funniest response is shown below.

Speed comparison of Haskell and Python is here -

Based on my understand, Haskell programs run slightly slower than C/C++, but often faster than PERL/python (without PyPy) in single CPU. The biggest advantage is in how easy it is to modigy codes to take advantage of multiple cores.

Written by M. //