• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why haskell (functional programming languages) ?

 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ranchers,

firstly i don't know whether this room is the right place for this question or not.. please forward if it is not..

my Question is why functional programming language are surrounding in the world while imperative programming languages are already take over?

why i ask this question because after some days my lecturer start teaching me this language and i am just confused that why we use functional programming language and where is useful?

Thanks in Advance..
[ March 05, 2007: Message edited by: Saif uddin ]
 
Joe Ess
Bartender
Posts: 9256
9
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's an old saying that goes: "when the only tool you have is a hammer, all your problems look like nails". If all you learned was imperitave programming, you'd tend to approach all your problems with a procedural mindset. There are some problems which are easier to approach from a functional point of view (map traversal and processing come to mind). Some areas of study tend to use functional programming over imperitave (AI, for example). You never know what kinds of problems you will have to solve, and you would not be well served with a toolbox that only had a hammer in it.
 
M Easter
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Learning unusual computer languages have a lot in common with learning new spoken languages (e.g. French, Japanese, Hindi).

(a) seeing abstract patterns in language gives one a broader view. I still remember the first time a professor told the class we would use a language that didn't have a "for/while loop" (APL, Lisp, etc) -- and yet it was a full Turing machine.

(b) not only does one have more tools, but one has more concepts -- some _ideas_ are very hard to express in one language, and yet are easier in another. _But_ this understanding can help you use any language in new ways. A "function object" is a powerful tool in Java, and yet has ties to functional languages. Also true for the current debate on closures. Learning Ruby can make you a better Java developer.
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for response.. guys.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic