3 ms·
I wouldn't say that it's the holy grail, but there are several reasons why it's good to know, and also many why we'll probably start seeing a lot more of it. T
by vault_ 16y ago
I wouldn't say that it's the holy grail, but there are several reasons why it's good to know, and also many why we'll probably start seeing a lot more of it.
The biggest reason that its' a good thing to learn a functional language is a lot like the reason that it's a good idea to learn more languages than just Java. In this case, all you have is one paradigm to think in (object-oriented (probably procedural as well, but...)). Functional programming is a completely different beast that requires different ways of thinking. Lots of the neater concepts of many popular languages now are lifted right out of functional ones. Python's list comprehensions and generators come to mind.
A more pragmatic reason to learn about functional programming is that it is becoming increasingly useful. Functional languages are, in general, much easier to parallelize. More importantly than that though, they make it easier to make _correct_ parallel and multi-threaded programs.
As for why these are often presented as the 'holy grail' of programming, many of features exist to make it simple to create concise, correct programs. The features are all the foreign-sounding buzzwords that people tend to rave about: composition, laziness, currying, lambda-functions, monads, strong type systems, type inference, higher-order functions, loop abstractions, and any number of other nifty things.
If you're interested in learning more, check out the Haskell or Ocaml languages (or Lisp, but Lisp isn't entirely functional).
- dsc 16y agoAny resources you suggest, just off the top of your head? Realworld haskell is free online, any others?
- vault_ 16y agoI'm a fan of Learn You a Haskell for Great Good (http://learnyouahaskell.com/ http://learnyouahaskell.com/). It's not quite done (a couple of advanced topics are absent at the moment) but it's a good introduction to the language, and is somewhat less dry to read than your average programming language book.
- gtani 16y agohttp://programming-scala.labs.oreilly.com/ http://programming-scala.labs.oreilly.com/ http://learnyousomeerlang.com/ http://learnyousomeerlang.com/ http://www.freetechbooks.com/functional-programming-f34.html http://www.freetechbooks.com/functional-programming-f34.html http://www.freetechbooks.com/introduction-to-objective-caml-t698.html http://www.freetechbooks.com/introduction-to-objective-caml-... I remember seeing lots of resources for erlang, scala, F#, haskell, clojure, ocaml, scheme and CL in delicious. Probably each of these lang's has a stackoverflow thread "What's so good about.."