Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I wondered what functional languages are mainly used for? I've been reading about them and read about Haskell and others. Some seem to be just "academic" languages which makes little sense to me, so hoping to get a better idea of their uses in real world applications.

share|improve this question
    
There are some good answers on stack overflow. Check this out. stackoverflow.com/questions/602444/… Ideally those should be moved here but we dont live in a perfect world. –  Jit B Jul 27 '13 at 5:11
1  
I use aura, but I'm not sure that's a typical example. –  tjameson Jul 27 '13 at 5:31
2  
what is a functionnal language for you? –  Simon Jul 27 '13 at 8:45
1  
@DeerHunter is JavaScript a functional language? I've seen arguments that it isn't? –  Jonnny Jul 27 '13 at 14:10
2  
@Johnny: True. There are, however, some main ideas that recur in most functional languages: referential transparency, functions as first-class values, closures, higher-order functions, immutable data, use of recursion instead of iterative computation + side-effects, algebraic data types, pattern matching, ... –  Giorgio Jul 27 '13 at 15:36

1 Answer 1

up vote 12 down vote accepted
  • Functional programming languages are really suitable for Big Data because if you think about it, most of Big Data is about data processing, filtering, aggregating (a.k.a Data Flow).

    Functional programming idioms such "Higher Order Functions", functions composition, partial functions, map/reduce, filtering, sequences abstraction (in Clojure) are a natural match to Big Data field.

  • Functional programming languages make it easy to write "Domain Specific Language".
  • Functional programming languages greatly simplify coding and architecting multithreaded and parallel systems (Erlang Actors, Elixir, Scala/Akka, Clojure/Pulsar).
  • Functional programming languages are suitable to code "Natural Language Processing", "Information Retrieval" and "Machine learning" systems. This is also due the "Higher Order Functions".

The ability to create and return functions dynamically at runtime is the main reason why Lisp is used to create AI and machine learning systems.

Dean Wampler gave an interesting talk at the Lambda Jam conference on why Copious Data is the Killer App for Functional Programming.

One field that I don't think functional programming fits in is building GUIs. This is where OOP shines. Just take a look at Cocoa and Cocoa Touch; both are well crafted frameworks.

Personally I like creating web applications with a functional programming languages. My favorite stack right now is Clojure/Pedestal/ClojureScript.

share|improve this answer
5  
FRP is a wonderful way to build GUI's. Personally I enjoy it more than any OOP framework I've used so far –  jozefg Jul 27 '13 at 13:42
    
@chiron Thanks, as soon as I get enough reputation I will upvote/accept this answer and also upvote some other comments as they were helpful to me. I've yet to really delve into the area in much detail but it does seem interesting - Thanks –  Jonnny Jul 27 '13 at 14:19
2  
@jozefg: What language + framework are you using for FRP? I find this topic very interesting. –  Giorgio Jul 27 '13 at 15:37
3  
@Giorgio I use Reactive Banana which is in Haskell. I've heard good things about Racket's FRP DSL language as well. I don't like JS so I haven't touched any of those libraries –  jozefg Jul 27 '13 at 15:40
    
Great anwser except "Just take a look at Cocoa and Cocoa Touch" - I would take a look at WPF and Reactive Extensions instead: proper declarative + functional-reactive GUI. I am afraid Cocoa comes from previous age. –  Den Aug 8 '13 at 9:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.