views:

508

answers:

4

Hello,

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).

+14  A: 

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

Pros

  • 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

Cons

  • 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
barkmadley
Wouldn't the head of the abilities list be one element? Maybe you mean the first couple takes =P
codebliss
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?
egaga
+1  A: 

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.

James Black
Wasn't AutoCAD written in a functional language?
Chuck
@Chuck - it appears to have been written in C. http://www.fourmilab.ch/autofile/www/subsection2_38_3_1.html
James Black
Oh, weird. For some reason I thought it was Lisp. Thanks for the correction.
Chuck
Lisp is used as a scripting language for AutoCAD.
Nemanja Trifunovic
@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.
James Black
+4  A: 

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.

David Crawshaw
+1  A: 

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.

CBFraser