views:

1438

answers:

10

I really hope nobody deems this question as closable because it's a pretty straight forward one.

I Googled this question, but not much information was found that was concise and informative for me.

For instance, if I start learning Haskell, what can I find myself using it for. What are some common uses for this language that I hear is a functional one.?

A: 

From Haskell:

Haskell is a standardized, general-purpose purely functional programming language, with non-strict semantics and strong static typing. It is named after logician Haskell Curry.

Basically Haskell can be used to create pretty much anything you would normally create using other general-purpose languages (e.g. C#, Java, C, C++, etc.).

Andrew Hare
+3  A: 

You can look here for some of the users that companies have found for it: http://www.haskell.org/haskellwiki/Haskell_in_industry

James Black
+1  A: 

This is a pretty good source for info about Haskell and its uses:

Open Source Haskell Releases and Growth
http://archhaskell.wordpress.com/2009/01/18/open-source-haskell-releases-and-growth/

Robert Harvey
+20  A: 

What are some common uses for this language

Rapid application development.

If you want to know why Haskell? Then you need to consider advantages of functional programming language

  • 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?

  • Many housekeeping tasks made for you: deconstructing data structures (PatternMatching), storing variable bindings (LexicalScope with closures), strong typing (TypeInference), GarbageCollection, storage allocation, whether to use boxed (pointer-to-value) or unboxed (value directly) representation...

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

Apart from this Haskell has its own advantages such as

  • Easy syntax
  • Another feature of Haskell is the possibility to use list comprehensions to creat a list based on existing lists.
  • And you can use the lamda calculus to use functions without giving them explicit names. So it's easier to handle big formulas
  • The lazy evaluation is a really nice feature because you can write undefined values for example into lists and can evaluat the rest nevertheless. That can helps you in any case because the values are not calculated before you really need them.

You can check out following links

Xinus
Nice answer. Quite enlightening.
AJ
+2  A: 

One example of Haskell in action is xmonad, a "featureful window manager in less than 1200 lines of code". See http://xmonad.org/

unutbu
+4  A: 

From the Haskell Wiki:

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.

Robert
+1  A: 

You might want to read Why Haskell Matters.

Apocalisp
+8  A: 

There is one good answer for what a general purpose language like Haskell is good for: writing programs in general.

For what it is used for in practice, I've three approaches to establishing that:

Indicates that it is good for graphics, networking, systems programming, data structures, databases, development, text processing ...

And finally, my opinion on what it is really strong at:

I hope that gives you a sense on how broad your question is, if it is to be answered with any specificity.

Don Stewart
+1  A: 

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.

Rayne
+4  A: 

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.

wheaties