Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.
If this question can be reworded to fit the rules in the help center, please edit the question.

8

No, I won't because it's a clear cut answer. No wiggle room for opinions and such. I just want to know what the language was created for.
–
Sergio TapiaOct 22 '09 at 3:03

@Papuccino1, wait, do you want to know what it's useful for, or what it was created for? The former is what the question is asking, and there's a lot of room for opinion there...
–
bdonlanOct 22 '09 at 3:04

1

@Papuccino1 - What benefit do the extra words in your title bring to the question? Also, I think you're misunderstanding the use of the term "functional" in this context, but it's hard to tell.
–
Chris LutzOct 22 '09 at 3:38

Agree on the dupe, though the titles of both questions make them look Subjective & Argumentative. I'm not sure it's a good idea to edit the title of a 6-month-old question though.
–
finnwOct 22 '09 at 4:43

Functional programs tend to be much more terse than their ImperativeLanguage counterparts. Often this leads to enhanced
programmer productivity

FP encourages quick prototyping. As such, I think it is the best software design paradigm for ExtremeProgrammers... but what do I know.

FP is modular in the dimension of functionality, where ObjectOrientedProgramming is modular in the dimension of different
components.

The ability to have your cake and eat it. Imagine you have a complex OO system processing messages - every component might make state
changes depending on the message and then forward the message to some
objects it has links to. Wouldn't it be just too cool to be able to
easily roll back every change if some object deep in the call
hierarchy decided the message is flawed? How about having a history of
different states?

Safe multithreading! Immutable data structures are not subject to data race conditions, and consequently don't have to be protected by
locks. If you are always allocating new objects, rather than
destructively manipulating existing ones, the locking can be hidden in
the allocation and GarbageCollection system.

Haskell is completely referentially transparent. Any code that uses I/O must be marked as such. This way, it encourages you to separate code with side effects (e.g. putting text on the screen) from code without (calculations).

Lazy evaluation is a really nice feature:

Even if something would usually cause an error, it will still work as long as you don't use the result. For example, you could put 1 / 0 as the first item of a list and it will still work if you only used the second item.

It is easier to write search programs such as this sudoku solver because it doesn't load every combination at once—it just generates them as it goes along. You can do this in other languages, but only Haskell does this by default.

The following thought often crosses my mind: in a pure language, a function always returns the same result when passed the same parameters. This is a guarantee. Imperative languages in contrast build everything on top of "statements". A statement does not come with any sort of guarantee (except its execution consumes time and produces heat). So the foundation is already shaky and everything bult on top of it will remain shaky. To me this was one of the reasons to learn haskell.
–
Martin DrautzburgOct 27 '14 at 14:18

I think people in this post are missing the most important point for anyone who has never used a functional programming language: expanding your mind. If you are new to functional programming then Haskell will make you think in ways you've never thought before. As a result your programming in other areas and other languages will improve. How much? Hard to quantify.

Haskell has a diverse range of use
commercially, from aerospace and
defense, to finance, to web startups,
hardware design firms and lawnmower
manufacturers. This page collects
resources on the industrial use of
Haskell.

According to Wikipedia, the Haskell language was created out of the need to consolidate existing functional languages into a common one which could be used for future research in functional-language design.

It is apparent based on the information available that it has outgrown it's original purpose and is used for much more than research. It is now considered a general purpose functional programming language.

If you're still asking yourself, "Why should I use it?", then read the Why use it? section of the Haskell Wiki Introduction.

Haskell is a general purpose programming language. It can be used for anything you use any other language to do. You aren't limited by anything but your own imagination. As for what it's suited for? Well, pretty much everything. There are few tasks in which a functional language does not excel.

And yes, I'm the Rayne from Dreamincode. :)

I would also like to mention that, in case you haven't read the Wikipedia page, functional programming is a paradigm like Object Oriented programming is a paradigm. Just in case you didn't know. Haskell is also functional in the sense that it works; it works quite well at that.

Just because a language isn't an Object Oriented language doesn't mean the language is limited by anything. Haskell is a general-purpose programming language, and is just as general purpose as Java.

We use haskell for making small domain specific languages. Huge amounts of data processing. Web development. Web spiders. Testing applications. Writing system administration scripts. Backend scripts, which communicate with other parties. Monitoring scripts (we have a DSL which works nicely together with munin, makes it much easier to write correct monitor code for your applications.)

All kind of stuff actually. It is just a everyday general purpose language with some very powerful and useful features, if you are somewhat mathematically inclined.

Re: the FB style, putting the false before the == means if you forget and only write a single = then the resulting behavior will be more obviously wrong instead of silently performing an unintended assignment operation and continuing normally
–
MagnusSep 19 '14 at 20:31

A that's clever, your force that particularly error to be known compile time then.
–
Edgar KlerksSep 19 '14 at 20:47

@EdgarKlerks, PHP has no compile time. This forces the exception to be raised where the mistake was, rather than leading to bizarre behavior or errors in distant code.
–
dfeuerJan 4 at 17:43

Although I see the benefit of writing false on the left, I don't see the point of using a tool to do it automatically: if you've already got a == operator then you already know you don't have the bug which that part of lex-pass is meant to catch, and if you've got a = instead there's no sure way to tell whether or not it's like that deliberately.
–
Jeremy ListApr 21 at 10:07

1

@JeremyList Maybe they are really stringent on the coding style. I can see that neatly formatted code invites to write more neatly formatted code. Just a wild guess.
–
Edgar KlerksApr 23 at 18:33