Pros And Cons Of Haskell [closed]

Tag: haskell Author: sssdsde Date: 2009-10-22

I've learned much languages, but now I want to choose one, but the language that I most liked was Haskell, it is like a interpreted language, but is a compiled. Then I want to know the pros and cons of this powerfull language(just to make the correct choice).

Best Answer

Just a couple of ideas i've got in my head at the moment.


  • Learning haskell will change the way you think about programming. (people often find themselves writing haskell-like code in other languages once they learn haskell)
  • Type safety is miles above mainstream languages (null pointer exceptions anyone?)
  • Type inference means you don't have to worry about types unless absolutely necessary.
  • It produces high performant executables.
  • Parallelism is almost trivial with the par and pseq combinators
  • The interactive environment (hugs/ghci) allow you to prototype ideas quickly
  • Has a nice supportive community (irc, mailing lists etc)
  • Very expressive and concise syntax
  • GHC is actively being developed and improved, including support for code execution on GPU for that extra kick of high performance computing
  • QuickCheck > unit testing


  • Learning haskell will ruin all other languages for you.
  • Is quite complicated to get into
  • Very easy to write cryptic programs that no-one understands, not even yourself a few days later


Wouldn't the head of the abilities list be one element? Maybe you mean the first couple takes =P
How about modularity? What are the biggest problems when creating complicated applications? Is it hard to get types right, or will one have to refactor a lot? Is it bothersome to write monadic and non-monadic versions?

Other Answer1

There are cons to using Haskell for certain projects, but there are no cons to learning Haskell. It takes time, but it is worth it. You will be a better programmer.

Other Answer2

I would also like to stress some of the practical features of Haskell, despite its mere beauty:

  • Gets in your way exactly where it should, and keeps out of your way otherwise. That's one of the interesting features, which is responsible for why Haskell just works.
  • Has a great concurrency system, which is ready for high performance applications.
  • Provides the basis for new, innovative abstractions and design patterns, among them my personal favorite, functional reactive programming.
  • Makes even very complicated problems easy to tackle, because a lot of the things, which you need to think about in other languages (proper sequencing, locking, initialization, etc.), are much less of an issue in Haskell.
  • Laziness is not simply an optimization. It allows you to solve problems in entirely new ways, which are much easier on the brain. No destructive updates, yet the same result with about the same performance.

If you have the choice, I totally recommend learning Haskell over any other language. It seems to make the optimal tradeoff between safety, level of abstractness and practicality among the existing languages.

Other Answer3

1) Haskell is the most state-of-the-art programming language. I did some research and haskell seems to be the only real state-of-the-art programming language. There are others like agda and coq, but those are quite experimental and lack features for real world programming (e.g. library support). It’s best to invest in a state-of-the art programming language.

(note: I don't argue about the details why haskell is state-of-the-art, and almost any other programming language is not. This would take too much time. So it's simply my subjective opinion. Same is true for the other statements.)

(note: some features I mention later are probably GHC specific, but I still write only haskell)

2) Haskell programmers are typically very smart. The code quality of the libraries is exceptionally high. Further, tips on developark are very well written, and also on a high level (thanks to people like Don Stewart, just to name one). I think one of the best ways to improve in programming is by learning from other peoples' code. Haskell is very good in that regard.

3) Imperative programming in moste OOP languages is obsolete. So is usual way of programming with side effects. But there are very few programming languages for declarative programming without side-effects. For instance Scala, F#, Ocaml and Erlang are not side effect free. (However, there is work, also in the academic field on OOP languages that are clearly not obsolete. Consider the work of Alan Kay in the past or for instance current state-of-the art academic work in the realm of Smalltalk.)

4) Haskell supports programming with abstract mathematical concepts (e.g. monads, functors, combinators, GADT, etc.). I think this boosts programming productivity.

5) The Haskell type system is very flexible, and supports type inference. This reduces the possible errors a lot. The type system is checked at compile time. The type systems helps as documentation.

6) Some state-of-the art concepts are implemented in haskell first (like the QuickCheck library). There are a lot of interesting extensions.

7) The haskell syntax is very well designed. There are no unnecessary parenthesis. The code is compact and the synatax for pattern matching and list comprehension is quite nice. People like Knuth advocate literate programming, and haskell/GHC supports it.

8) haskell supports lazy evaluation

1) It's very hard to learn, and it takes hours, months to master haskell. It’s even harder without a proper computer science background. Things like Monads and Functors are hard to understand, especially without mathematical background. So most programmers probably don’t have the ability or will to learn haskell. Haskell is not ‘simple’. Howevery it’s impossible to have a simple language that supports all the advanced features.

2) The IDE options are not as good as those for other programming languages. I use leksah as my IDE, it’s very good, but it’s not comparable to Eclipse for java development.

3) Haskell cannot be used for android or Iphone development. In contrast Scala can be used for android development, and it’s also compatible to java, which is a huge advantage.

4) I think some libraries lack supporting people who maintain and improve them. I do semantic web programming in haskell, and the library support could be better.

Haskell is not suited for all projects. If you need every millisecond of performance, C/C++ is still probably the best option. So haskell is suited for many projects, but not all.

Haskell has many technical advantages over other programming languages. However, there might be political reason against using haskell. For example Scala integrates better with existing java infrastructure.


"Haskell programmers are typically very smart" -> This "reason" seems to appear in most of the discussions about paradigms, and specifically when Haskell is mentioned. I love Haskell, but that's just pure idiocy. Prejudices are not good; there are no valid dogmas in computer science. Treating a fallacy as bad as that one as a valid argument is just pitiable.
It would be are better to write "very good programmer" instead of smart. Languages like Haskell and more so Coq/Agda (also Istabelle, and others) attract very good programmers and usually leaving out programmers that are not so good. The latter are too frustrated with IO or by their lack of understanding of Category theory that they stop using haskell. There are many languages that also target amateur programmers (like PHP) or langauges like Java that have to goal to feel "simple and familiar". The "average" Agda user has completed a PhDdegree in CS or maths and is a very very good programmer.
Well, that would be much more accurate. There are some other reasons that are more or less debatable, but I agree with you. For example, both paradigms are old, and in the real there are a lot of things that are all about mutation. Still, yours are valid reasons.

Other Answer4

but now I want to choose one


Then I want to know the pros and cons of this powerfull language(just to make the correct choice).

If you will permit me to generalize, the choice of a language really depends on the problem you are trying to solve. There is no one choice that will work for everything, and there will always be some language that will look better than the one you are using now.

Keep learning new languages, however, since the experiences will heighten your abilities to know when a language is wrong for a project.

Other Answer5

What do you want to write, what type of applications? What problems do you want to solve?

There are some problem types that Haskell will excel in, but, if you write a program that requires constantly changing state then Haskell is a bad choice.

If while modeling the problem it doesn't fit well with functional programming, such as writing a CAD (computer-aided design) program, OOP would be a better choice, just because the programming paradigm fits better with the model.

But, if you are not affected by these problems then Haskell can be a great language to use.


Wasn't AutoCAD written in a functional language?
@Chuck - it appears to have been written in C.
Oh, weird. For some reason I thought it was Lisp. Thanks for the correction.
Lisp is used as a scripting language for AutoCAD.
@Nemanja - Thank you, I didn't think about a scripting language for AutoCAD, but that would make sense, as it works well with LISPs flexibility.