<p>I see a lot of talk on here about functional languages and stuff.  Why would you use one over a "traditional" language?  What do they do better?  What are they worse at?  What's the ideal functional programming application?</p>

[{'answer_id': 36507, 'author': 'Kyle Cronin', 'author_id': 658, 'author_profile': 'https://Stackoverflow.com/users/658', 'pm_score': 4, 'selected': False, 'text': "<p>One key feature in a functional language is the concept of first-class functions. The idea is that you can pass functions as parameters to other functions and return them as values.</p>\n\n<p>Functional programming involves writing code that does not change state. The primary reason for doing so is so that successive calls to a function will yield the same result. You can write functional code in any language that supports first-class functions, but there are some languages, like Haskell, which do not allow you to change state. In fact, you're not supposed to make any side effects (like printing out text) at all - which sounds like it could be completely useless.</p>\n\n<p>Haskell instead employs a different approach to IO: monads. These are objects that contain the desired IO operation to be executed by your interpreter's toplevel. At any other level they are simply objects in the system.</p>\n\n<p>What advantages does functional programming provide? Functional programming allows coding with fewer potentials for bugs because each component is completely isolated. Also, using recursion and first-class functions allows for simple proofs of correctness which typically mirror the structure of the code.</p>\n"}, {'answer_id': 36513, 'author': 'Mendelt', 'author_id': 3320, 'author_profile': 'https://Stackoverflow.com/users/3320', 'pm_score': 9, 'selected': True, 'text': "<p>Functional languages use a different paradigm than imperative and object-oriented languages. They use side-effect-free functions as a basic building block in the language. This enables lots of things and makes a lot of things more difficult (or in most cases different from what people are used to).</p>\n\n<p>One of the biggest advantages with functional programming is that the order of execution of side-effect-free functions is not important. For example, in Erlang this is used to enable concurrency in a very transparent way. \nAnd because functions in functional languages behave very similar to mathematical functions it's easy to translate those into functional languages. In some cases, this can make code more readable.</p>\n\n<p>Traditionally, one of the big disadvantages of functional programming was also the lack of side effects. It's very difficult to write useful software without IO, but IO is hard to implement without side effects in functions. So most people never got more out of functional programming than calculating a single output from a single input. In modern mixed-paradigm languages like F# or Scala this is easier.</p>\n\n<p>Lots of modern languages have elements from functional programming languages. C# 3.0 has a lot functional programming features and you can do functional programming in Python too. I think the reasons for the popularity of functional programming is mostly because of two reasons: Concurrency is getting to be a real problem in normal programming because we're getting more and more multiprocessor computers; and the languages are getting more accessible.</p>\n"}, {'answer_id': 42893, 'author': 'Rodrick Chapman', 'author_id': 3927, 'author_profile': 'https://Stackoverflow.com/users/3927', 'pm_score': 1, 'selected': False, 'text': '<p>In addition to the other answers, casting the solution in pure functional terms forces one to understand the problem better. Conversely, thinking in a functional style will develop better* problem solving skills.</p>\n\n<p>*Either because the functional paradigm is better or because it will afford an additional angle of attack.</p>\n'}, {'answer_id': 42982, 'author': 'grom', 'author_id': 486, 'author_profile': 'https://Stackoverflow.com/users/486', 'pm_score': 2, 'selected': False, 'text': '<p>Checkout <a href="http://www.cse.chalmers.se/~rjmh/Papers/whyfp.pdf" rel="nofollow noreferrer">Why Functional Programming Matters</a></p>\n'}, {'answer_id': 370659, 'author': 'Mike K', 'author_id': 45606, 'author_profile': 'https://Stackoverflow.com/users/45606', 'pm_score': 3, 'selected': False, 'text': "<p>I must be dense, but I still don't get it.  Are there any actual examples of small app's written in a functional language like F# where you can look at the source code and see how and why it was better to use such an approach than, say, C#?</p>\n"}, {'answer_id': 411298, 'author': 'Steven Robbins', 'author_id': 26507, 'author_profile': 'https://Stackoverflow.com/users/26507', 'pm_score': 7, 'selected': False, 'text': "<p>The main plus for me is its inherent parallelism, especially as we are now moving away from more MHz and towards more and more cores.</p>\n\n<p>I don't think it will become the next programming paradigm and completely replace OO type methods, but I do think we will get to the point that we need to either write some of our code in a functional language, or our general purpose languages will grow to include more functional constructs.</p>\n"}, {'answer_id': 411300, 'author': 'DFectuoso', 'author_id': 47846, 'author_profile': 'https://Stackoverflow.com/users/47846', 'pm_score': 1, 'selected': False, 'text': "<p>I'm actually learning LISP after reading Hackers and Painters and I do believe I will LEARN something from LISP that will give me a better undertanding of everything else I program. Now I dont think I will actually be using LISP in my everyday just because some guy in 1995 created a website that became Yahoo Stores. So its a win-win anyway (if it catches on I win if not, I get more points of views on how to program and how stuff works)</p>\n\n<p>Now... on another question kinda related, do I think programming will change a lot with 32 cores procs arriving next year? YES, I dont know if it will be functional programming but... im pretty sure there will be something diferent!</p>\n"}, {'answer_id': 411305, 'author': 'duffymo', 'author_id': 37213, 'author_profile': 'https://Stackoverflow.com/users/37213', 'pm_score': 2, 'selected': False, 'text': '<p>I agree with the first point, but times change.  Corporations will respond, even if they\'re late adopters, if they see that there\'s an advantage to be had.  Life is dynamic.</p>\n\n<p>They were teaching Haskell and ML at Stanford in the late 90s.  I\'m sure that places like Carnegie Mellon, MIT, Stanford, and other good schools are presenting it to students.</p>\n\n<p>I agree that most "expose relational databases on the web" apps will continue in that vein for a long time.  Java EE, .NET, RoR, and PHP have evolved some pretty good solutions to that problem.</p>\n\n<p>You\'ve hit on something important: It might be the problem that can\'t be solved easily by other means that will boost functional programming.  What would that be?</p>\n\n<p>Will massive multicore hardware and cloud computing push them along?</p>\n'}, {'answer_id': 411308, 'author': 'Michael Paulukonis', 'author_id': 41153, 'author_profile': 'https://Stackoverflow.com/users/41153', 'pm_score': 5, 'selected': False, 'text': '<blockquote>\n<p>Most applications are simple enough to be solved in normal OO ways</p>\n</blockquote>\n<ol>\n<li><p>OO ways have not always been &quot;normal.&quot; This decade\'s standard was last decade\'s marginalized concept.</p>\n</li>\n<li><p>Functional programming is math. <a href="http://www.paulgraham.com/icad.html" rel="nofollow noreferrer">Paul Graham on Lisp</a> (replace Lisp by functional programming):</p>\n</li>\n</ol>\n<blockquote>\n<p>So the short explanation of why this\n1950s language is not obsolete is that\nit was not technology but math, and\nmath doesn’t get stale. The right\nthing to compare Lisp to is not 1950s\nhardware, but, say, the Quicksort\nalgorithm, which was discovered in\n1960 and is still the fastest\ngeneral-purpose sort.</p>\n</blockquote>\n'}, {'answer_id': 411309, 'author': 'user21714', 'author_id': 21714, 'author_profile': 'https://Stackoverflow.com/users/21714', 'pm_score': 6, 'selected': False, 'text': "<p>Even if you never work in a functional language professionally, understanding functional programming will make you a better developer. It will give you a new perspective on your code and programming in general. </p>\n\n<p>I say there's no reason to not learn it.</p>\n\n<p>I think the languages that do a good job of mixing functional and imperative style are the most interesting and are the most likely to succeed. </p>\n"}, {'answer_id': 411310, 'author': 'tylermac', 'author_id': 38104, 'author_profile': 'https://Stackoverflow.com/users/38104', 'pm_score': 2, 'selected': False, 'text': '<p>Most application can be solved in [insert your favorite language, paradigm, etc. here].</p>\n\n<p>Although, this is true, different tools can be used to solve different problems. Functional just allows another high (higher?) level abstraction that allows to do our jobs more effectively when used correctly.</p>\n'}, {'answer_id': 411334, 'author': 'slim', 'author_id': 7512, 'author_profile': 'https://Stackoverflow.com/users/7512', 'pm_score': 1, 'selected': False, 'text': '<blockquote>\n  <p>It\'s not really taught at universities (or is it nowadays?)</p>\n</blockquote>\n\n<p>I don\'t know about nowadays, but I was taught both Miranda and Lisp as part of my CS course in the mid 1990s. Despite not using a pure functional language since, it has influenced the way I solve problems.</p>\n\n<blockquote>\n  <p>Most applications are simple enough to be solved in normal OO ways</p>\n</blockquote>\n\n<p>In the same mid \'90s CS course, OO (taught using Eiffel) was taught pretty much on a par with functional programming. Both were non-mainstream at the time. OO may be "normal" now, but it was not ever thus.</p>\n\n<p>I\'ll be interested to see whether F# is the thing that pushes FP into the mainstream.</p>\n'}, {'answer_id': 411339, 'author': 'Jason Baker', 'author_id': 2147, 'author_profile': 'https://Stackoverflow.com/users/2147', 'pm_score': 3, 'selected': False, 'text': "<p>I think one reason is that <strong>some people feel that the most important part of whether a language will be accepted is how good the language is</strong>.  Unfortunately, things are rarely so simple.  For example, I would argue that the biggest factor behind Python's acceptance isn't the language itself (although that <em>is</em> pretty important).  The biggest reason why Python is so popular is its huge standard library and the even bigger community of 3rd party libraries.</p>\n\n<p>Languages like Clojure or F# may be the exception to the rule on this considering that they're built upon the JVM/CLR.  As a result, I don't have an answer for them.</p>\n"}, {'answer_id': 411351, 'author': 'zendar', 'author_id': 25732, 'author_profile': 'https://Stackoverflow.com/users/25732', 'pm_score': 3, 'selected': False, 'text': "<p>F# could catch on because Microsoft is pushing it.</p>\n\n<p>Pro:</p>\n\n<ul>\n<li>F# is going to be part of next version of Visual Studio </li>\n<li>Microsoft is building community for some time now - evangelists, books, consultants that work with high profile customers, significant exposure at MS conferences.</li>\n<li>F# is first class .Net language and it's the first functional language that comes with really big foundation (not that I say that Lisp, Haskell, Erlang, Scala, OCaml do not have lots of libraries, they are just not as complete as .Net is)</li>\n<li>Strong support for parallelism </li>\n</ul>\n\n<p>Contra: </p>\n\n<ul>\n<li>F# is very hard to start even if you are good with C# and .Net - at least for me :(</li>\n<li>it will probably be hard to find good F# developers </li>\n</ul>\n\n<p>So, I give 50:50 chance to F# to become important. Other functional languages are not going to make it in near future.</p>\n"}, {'answer_id': 411356, 'author': 'Sebastian', 'author_id': 8686, 'author_profile': 'https://Stackoverflow.com/users/8686', 'pm_score': 2, 'selected': False, 'text': '<p>Because FP has significant benefits in terms of productivity, reliability and maintainability. Many-core may be a killer app that finally gets big corporations to switch over despite large volumes of legacy code.Furthermore, even big commercial languages like C# are taking on a distinct functional flavour as a result of many-core concerns - side effects simply don\'t fit well with concurrency and parallelism.</p>\n\n<p>I do not agree that "normal" programmers won\'t understand it. They will, just like they eventually understood OOP (which is just as mysterious and weird, if not more so).</p>\n\n<p>Also, most universities do teach FP, many even teach it as the first programming course.</p>\n'}, {'answer_id': 411364, 'author': 'jalf', 'author_id': 33213, 'author_profile': 'https://Stackoverflow.com/users/33213', 'pm_score': 4, 'selected': False, 'text': '<blockquote>\n  <p>The average corporate programmer, e.g.\n  most of the people I work with, will\n  not understand it and most work\n  environments will not let you program\n  in it</p>\n</blockquote>\n\n<p>That one is just a matter of time though. Your average corporate programmer learns whatever the current Big Thing is. 15 years ago, they didn\'t understand OOP.\n<em>IF</em> FP catches on, your "average corporate programmers" will follow.</p>\n\n<blockquote>\n  <p>It\'s not really taught at universities\n  (or is it nowadays?)</p>\n</blockquote>\n\n<p>Varies a lot. At my university, SML is the very first language students are introduced to.\nI believe MIT teaches LISP as a first-year course. These two examples may not be representative, of course, but I believe most universities at the very least offer some optional courses on FP, even if they don\'t make it a mandatory part of the curriculum.</p>\n\n<blockquote>\n  <p>Most applications are simple enough to\n  be solved in normal OO ways</p>\n</blockquote>\n\n<p>It\'s not really a matter of "simple enough" though. Would a solution be <em>simpler</em> (or more readable, robust, elegant, performant) in FP? Many things are "simple enough to be solved in Java", but it still requires a godawful amount of code.</p>\n\n<p>In any case, keep in mind that FP proponents have claimed that it was the Next Big Thing for several decades now. Perhaps they\'re right, but keep in mind that they weren\'t when they made the same claim 5, 10 or 15 years ago.</p>\n\n<p>One thing that definitely counts in their favor, though, is that recently, C# has taken a sharp turn towards FP, to the extent that it\'s practically turning a generation of programmers into FP programmers, <em>without them even noticing</em>. That might just pave the way for the FP "revolution". Maybe. ;)</p>\n'}, {'answer_id': 411406, 'author': 'Tim', 'author_id': 10755, 'author_profile': 'https://Stackoverflow.com/users/10755', 'pm_score': 2, 'selected': False, 'text': '<p>It seems to me that those people who never learned Lisp or Scheme as an undergraduate are now discovering it.  As with a lot of things in this field there is a tendency to hype and create high expectations...</p>\n\n<p>It will pass.</p>\n\n<p>Functional programming is great.  However, it will not take over the world.  C, C++, Java, C#, etc will still be around.</p>\n\n<p>What will come of this I think is more cross-language ability - for example implementing things in a functional language and then giving access to that stuff in other languages.  </p>\n'}, {'answer_id': 411409, 'author': 'Chuck', 'author_id': 50742, 'author_profile': 'https://Stackoverflow.com/users/50742', 'pm_score': 2, 'selected': False, 'text': '<p>Things have been moving in a functional direction for a while. The two cool new kids of the past few years, Ruby and Python, are both radically closer to functional languages than what came before them — so much so that some Lispers have started supporting one or the other as "close enough." </p>\n\n<p>And with the massively parallel hardware putting evolutionary pressure on everyone — and functional languages in the best place to deal with the changes — it\'s not as far a leap as it once was to think that Haskell or F# will be the next big thing.</p>\n'}, {'answer_id': 411658, 'author': 'Juliet', 'author_id': 40516, 'author_profile': 'https://Stackoverflow.com/users/40516', 'pm_score': 2, 'selected': False, 'text': '<p>Have you been following the evolution of programming languages lately? Every new release of all mainstream programming languages seems to borrow more and more features from functional programming.</p>\n\n<ul>\n<li><p>Closures, anonymous functions, passing and returning functions as values used to be exotic features known only to Lisp and ML hackers. But gradually, C#, Delphi, Python, Perl, Javascript, have added support for closures. Its not possible for any up-and-coming language to be taken seriously without closures.</p></li>\n<li><p>Several languages, notably Python, C#, and Ruby have native support for list comprehensions and list generators.</p></li>\n<li><p>ML pioneered generic programming in 1973, but support for generics ("parametric polymorphism") has only become an industry standard in the last 5 years or so. If I remember correctly, Fortran supported generics in 2003, followed by Java 2004, C# in 2005, Delphi in 2008. (I know C++ has supported templates since 1979, but 90% of discussions on C++\'s STL start with "here there be demons".)</p></li>\n</ul>\n\n<p>What makes these features appealing to programmers? It should be plainly obvious: <strong>it helps programmers write shorter code</strong>. All languages in the future are going to support -- at a minimum -- closures if they want to stay competitive. In this respect, functional programming is already in the mainstream.</p>\n\n<blockquote>\n  <p>Most applications are simple enough to\n  be solved in normal OO ways</p>\n</blockquote>\n\n<p>Who says can\'t use functional programming for simple things too? Not every functional program needs to be a compiler, theorem prover, or massively parallel telecommunications switch. I regularly use F# for ad hoc throwaway scripts in addition to my more complicated projects.</p>\n'}, {'answer_id': 411674, 'author': 'joel.neely', 'author_id': 3525, 'author_profile': 'https://Stackoverflow.com/users/3525', 'pm_score': 8, 'selected': False, 'text': '<p>I don\'t think that there\'s any question about the functional approach to programming "catching on", because it\'s been in use (as a style of programming) for about 40 years. Whenever an OO programmer writes clean code that favors immutable objects, that code is borrowing functional concepts.</p>\n\n<p>However, languages that <em>enforce</em> a functional style are getting lots of virtual ink these days, and whether those languages will become dominant in the future is an open question. My own suspicion is that hybrid, multi-paradigm languages such as <a href="http://www.scala-lang.org/" rel="noreferrer">Scala</a> or <a href="http://ocaml.org" rel="noreferrer">OCaml</a>\nwill likely dominate over "purist" functional languages in the same way that pure OO language (Smalltalk, Beta, etc.) have influenced mainstream programming but haven\'t ended up as the most widely-used notations.</p>\n\n<p>Finally, I can\'t resist pointing out that your comments re FP are highly parallel to the remarks I heard from procedural programmers not that many years ago:</p>\n\n<ul>\n<li>The (mythical, IMHO) "average" programmer doesn\'t understand it.</li>\n<li>It\'s not widely taught.</li>\n<li>Any program you can write with it can be written another way with current techniques.</li>\n</ul>\n\n<p>Just as graphical user interfaces and "code as a model of the business" were concepts that helped OO become more widely appreciated, I believe that increased use of immutability and simpler (massive) parallelism will help more programmers see the benefits that the functional approach offers. But as much as we\'ve learned in <a href="http://blip.tv/file/1472720" rel="noreferrer">the past 50 or so years</a> that make up the entire history of digital computer programming, I think we still have much to learn. Twenty years from now, programmers will look back in amazement at the primitive nature of the tools we\'re currently using, <em>including</em> the now-popular OO and FP languages.</p>\n'}, {'answer_id': 411736, 'author': 'obecalp', 'author_id': 47303, 'author_profile': 'https://Stackoverflow.com/users/47303', 'pm_score': 4, 'selected': False, 'text': "<p>I don't think most realistic people think that functional programming will catch on (becomes the main paradigm like OO). After all, most business problems are not pretty math problems but hairy imperative rules to move data around and display them in various ways, which means it's not a good fit for pure functional programming paradigm (the learning curve of monad far exceeds OO.)</p>\n\n<p>OTOH, functional programming is what makes programming fun. It makes you appreciate the  inherent, timeless beauty of succinct expressions of the underlying math of the universe. People say that learning functional programming will make you a better programmer. This is of course highly subjective. I personally don't think that's completely true either.</p>\n\n<p>It makes you a better sentient being.</p>\n"}, {'answer_id': 411744, 'author': 'Pete OHanlon', 'author_id': 43635, 'author_profile': 'https://Stackoverflow.com/users/43635', 'pm_score': 2, 'selected': False, 'text': '<p>Wow - this is an interesting discussion. My own thoughts on this:</p>\n\n<p>FP makes some tasks relatively simple (compared to none-FP languages).\nNone-FP languages are already starting to take ideas from FP, so I suspect that this trend will continue and we will see more of a merge which should help people make the leap to FP easier.</p>\n'}, {'answer_id': 411749, 'author': 'Norman Ramsey', 'author_id': 41661, 'author_profile': 'https://Stackoverflow.com/users/41661', 'pm_score': 6, 'selected': False, 'text': '<p>I\'m always skeptical about the Next Big Thing.  Lots of times the Next Big Thing is pure accident of history, being there in the right place at the right time no matter whether the technology is good or not.  Examples: C++, Tcl/Tk, Perl.  All flawed technologies, all wildly successful because they were perceived either to solve the problems of the day or to be nearly identical to entrenched standards, or both.  Functional programming may indeed be great, but that doesn\'t mean it will be adopted.</p>\n\n<p>But I <em>can</em> tell you why people are <em>excited</em> about functional programming: many, many programmers have had a kind of "conversion experience" in which they discover that using a functional language makes them twice as productive (or maybe ten times as productive) while producing code that is more resilient to change and has fewer bugs.  These people think of functional programming as a secret weapon; a good example of this mindset is Paul Graham\'s <a href="http://www.paulgraham.com/avg.html" rel="noreferrer">Beating the Averages</a>.  Oh, and his application?  E-commerce web apps.</p>\n\n<p>Since early 2006 there has also been some buzz about functional programming and parallelism.  Since people like <a href="http://research.microsoft.com/en-us/people/simonpj/default.aspx" rel="noreferrer">Simon Peyton Jones</a> have been worrying about parallelism off and on since at least 1984, I\'m not holding my breath until functional languages solve the multicore problem.  But it does explain some of the additional buzz right about now.</p>\n\n<p>In general, American universities are doing a poor job teaching functional programming.  There\'s a strong core of support for <a href="http://htdp.org/" rel="noreferrer">teaching intro programming using Scheme</a>, and Haskell also enjoys some support there, but there\'s very little in the way of teaching advanced technique for functional programmer.  I\'ve taught such a course at Harvard and will do so again this spring at Tufts.  Benjamin Pierce has taught such a course at Penn.  I don\'t know if Paul Hudak has done anything at Yale.  The European universities are doing a much better job; for example, functional programming is emphasized in important places in Denmark, the Netherlands, Sweden, and the UK.  I have less of a sense of what\'s happening in Australasia.</p>\n'}, {'answer_id': 411767, 'author': 'kal', 'author_id': 43756, 'author_profile': 'https://Stackoverflow.com/users/43756', 'pm_score': 0, 'selected': False, 'text': '<p>It has already caught on with Map/reduce in <a href="http://en.wikipedia.org/wiki/Hadoop" rel="nofollow noreferrer">Hadoop</a></p>\n'}, {'answer_id': 412132, 'author': 'Alex Baranosky', 'author_id': 47630, 'author_profile': 'https://Stackoverflow.com/users/47630', 'pm_score': 1, 'selected': False, 'text': '<p>I think the biggest argument for functional programming languages to become the "next big thing" is that in the future multi-core processors will be the norm.  Programmers will have to take advantage of that, and functional programming offers really wonderful possibilities for building top of the line concurrent software.</p>\n\n<p>P.S. When I was in college at Boston University (\'98-\'02) we spent a semester learning Scheme which is a close cousin of LISP.  When we first started learning it, I wanted to rip my hair out.  By the end of the course it was very natural.</p>\n'}, {'answer_id': 412764, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 5, 'selected': False, 'text': "<p>I don't see anyone mentioning the elephant in the room here, so I think it's up to me :)</p>\n\n<p>JavaScript is a functional language. As more and more people do more advanced things with JS, especially leveraging the finer points of jQuery, Dojo, and other frameworks, FP will be introduced by the web-developer's back-door. </p>\n\n<p>In conjunction with closures, FP makes JS code really light, yet still readable. </p>\n\n<p>Cheers,\nPS</p>\n"}, {'answer_id': 412866, 'author': 'Breton', 'author_id': 51101, 'author_profile': 'https://Stackoverflow.com/users/51101', 'pm_score': 2, 'selected': False, 'text': "<p>I don't know whether it will catch on or not, but from my investigations, a functional language is almost certainly worth learning, and will make you a better programmer. Just understanding referential transparency makes a lot of design decisions so much easier- and the resulting programs much easier to reason about. Basically, if you run into a problem, then it tends to only be a problem with the output of a single function, rather than a problem with an inconsistant state, which could have been caused by any of the hundreds of classes/methods/functions in an imparative language with side effects.</p>\n\n<p>The stateless nature of FP maps more naturally to the stateless nature of the web, and thus functional languages lend themselves more easily to more elegant, RESTFUL webapps. Contrast with JAVA and .NET frameworks that need to resort to horribly ugly HACKS like VIEWSTATE and SESSION keys to maintain application state, and maintain the (occasionally quite leaky) abstraction of a stateful imperative language, on an essentially stateless functional platform like the web. </p>\n\n<p>And also, the more stateless your application, the more easily it can lend itself to parallel processing. Terribly important for the web, if your website happens to get popular. It's not always straightforward to just add more hardware to a site to get better performance.</p>\n"}, {'answer_id': 412882, 'author': 'Breton', 'author_id': 51101, 'author_profile': 'https://Stackoverflow.com/users/51101', 'pm_score': 5, 'selected': False, 'text': "<p>I bet you didn't know you were functional programming when you used:</p>\n\n<ul>\n<li>Excel formulas</li>\n<li>Quartz Composer</li>\n<li>JavaScript</li>\n<li>Logo (Turtle graphics)</li>\n<li>LINQ</li>\n<li>SQL</li>\n<li>Underscore.js (or Lodash),\nD3</li>\n</ul>\n"}, {'answer_id': 412889, 'author': 'Chris', 'author_id': 36269, 'author_profile': 'https://Stackoverflow.com/users/36269', 'pm_score': 0, 'selected': False, 'text': '<p>I think the answer to your question lies more in the statement, "the right tool for the job", than the hottest thing.  There will always be hot new technologies, and there will always be those who jump on them.</p>\n\n<p>Functional languages have been around for a while, it\'s just now they are getting more press.</p>\n'}, {'answer_id': 412911, 'author': 'ja.', 'author_id': 15467, 'author_profile': 'https://Stackoverflow.com/users/15467', 'pm_score': 2, 'selected': False, 'text': '<p>It\'s catching on because it\'s the best tool around for controlling complexity. \nSee:<br>\n  - slides 109-116 of Simon Peyton-Jones talk "A Taste of Haskell"<br>\n  - "The Next Mainstream Programming Language: A Game Developer\'s Perspective" by Tim Sweeney</p>\n'}, {'answer_id': 412935, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>Uh, sorry to be a pedant, but it has already caught on - we call it Excel.</p>\n\n<p><a href="http://research.microsoft.com/en-us/um/people/simonpj/papers/excel/" rel="nofollow noreferrer">http://research.microsoft.com/en-us/um/people/simonpj/papers/excel/</a></p>\n\n<p>The vast majority of programmes that run on computers are written in Excel or one of the many popular clones of it.</p>\n\n<p>(there are many programmes that are run many times, and programmes written in Excel tend NOT to be ones of these - most Excel programmes have 1 run instance)</p>\n'}, {'answer_id': 413240, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>FP is the next best paradigm that is for sure. Now which language could be the next step, That is the hard stuff but I believe could be Haskell, F#, Clojure, Ocaml or Erlang. Or could be Python with more FP constructs and better support for parallelism/performance or also Perl 6 with parrot looks very interesting.</p>\n'}, {'answer_id': 413288, 'author': 'peSHIr', 'author_id': 50846, 'author_profile': 'https://Stackoverflow.com/users/50846', 'pm_score': 1, 'selected': False, 'text': '<ul>\n<li>How long did it take OOP to get understood by the average corporate programmer...?</li>\n<li>I was taught functional programming at Utrecht University in - I think - 1994 and only see it start to catch on "in the real world" in the last couple of years.</li>\n<li>There is no such thing as a "simple application". ;-)</li>\n</ul>\n\n<p>I think that (approaching) side effect free programming for some key parts of software will be essential when we start to get more and more cores in our hardware. Give functional programming a bit more time. And the functional sprinkling in current and future versions of C# will go a long way in preparing those corporate programmers for functional programming without them even realising it...</p>\n'}, {'answer_id': 413350, 'author': 'Peanut', 'author_id': 47036, 'author_profile': 'https://Stackoverflow.com/users/47036', 'pm_score': 2, 'selected': False, 'text': "<p>My view is that it will catch on now that Microsoft have pushed it much further into the mainstream. For me it's attractive because of what it can do for us, because it's a new challenge and because of the job opportunities it resents for the future.</p>\n\n<p>Once mastered it will be another tool to further help make us more productive as programmers.</p>\n"}, {'answer_id': 418256, 'author': 'Michael Easter', 'author_id': 12704, 'author_profile': 'https://Stackoverflow.com/users/12704', 'pm_score': 1, 'selected': False, 'text': '<p>Some thoughts:</p>\n\n<ul>\n<li>The debate between FP and imperative programming (OO, structured, etc), has been raging since Lisp versus Fortran.  I think you pose excellent questions but recognize that they are not especially new.</li>\n<li>Part of the hoopla over FP is that we seem to be recognizing that concurrency is very difficult, and that locks and other mechanisms in OO (e.g. Java) are just one solution. FP offers a refreshing sea change with ideas such as Actors and the power of stateless computing. To those wrestling with OO, the landscape seems highly appealing.</li>\n<li>Yes, schools teach FP. In fact, the University of Waterloo and others offer Scheme in first year classes (<a href="http://compsci.ca/blog/computer-science-at-waterloo-the-new-scheme-of-things/" rel="nofollow noreferrer">reference here</a>).</li>\n<li>Regarding the average programmer, I\'m sure that the same arguments were given against C++ back in the early 1990s. And look what happened.  <em>If</em> businesses can gain an advantage via a technology, you can bet that people will receive training.  </li>\n</ul>\n\n<p>This is not to say that it is a sure thing, or that there won\'t be a backlash in 3-5 years (as there always is). However, the trend towards FP has merit and is worth watching.</p>\n'}, {'answer_id': 423477, 'author': 'Janis Veinbergs', 'author_id': 50173, 'author_profile': 'https://Stackoverflow.com/users/50173', 'pm_score': 2, 'selected': False, 'text': '<p>When reading "The Next Mainstream Programming Language: A Game Developer’s Perspective" by Tim Sweeney, Epic Games, my first thought was - I got to learn Haskell.</p>\n\n<p><a href="http://www.cs.princeton.edu/~dpw/popl/06/Tim-POPL.ppt" rel="nofollow noreferrer">PPT</a></p>\n\n<p><a href="http://209.85.129.132/search?q=cache:vEhsoTFOx4sJ:www.cs.princeton.edu/~dpw/popl/06/Tim-POPL.ppt+gears+of+war+developer+future+language&amp;hl=lv&amp;ct=clnk&amp;cd=1" rel="nofollow noreferrer">Google\'s HTML Version</a></p>\n'}, {'answer_id': 426984, 'author': 'Herrmann', 'author_id': 10575, 'author_profile': 'https://Stackoverflow.com/users/10575', 'pm_score': 1, 'selected': False, 'text': '<p>There\'s a great article from <a href="http://www.defmacro.org/" rel="nofollow noreferrer">Slava Akhmechet</a> called <a href="http://www.defmacro.org/ramblings/fp.html" rel="nofollow noreferrer">Functional Programming For The Rest of Us</a> (this was the article that got me into FP btw). Amongst the benefits FP brings, he unorthodoxly emphasizes the following (which I believe contributes to the appeal for software engineers):</p>\n\n<ul>\n<li>Unit Testing</li>\n<li>Debugging</li>\n<li>Concurrency</li>\n<li>Hot Code Deployment</li>\n<li>Machine Assisted Proofs and Optimizations</li>\n</ul>\n\n<p>And then goes on to discuss the goodness of more traditionally discussed aspects of FP like higher order functions, currying, lazy evaluation, optimization, abstracting control structures (although not discussing monads), infinite data structures, strictness, continuations, pattern matching, closures and so on.</p>\n\n<p>Highly recommended !</p>\n'}, {'answer_id': 455747, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>Lots of people have mentioned Functional Languages. </p>\n\n<p>But some of the Most commonly used Functional Languages in use today besides Javascript.</p>\n\n<p>Excel, SQL, XSLT, XQuery,  J and K are used in financial realm.  </p>\n\n<p>Of course Erlang.</p>\n\n<p>So I would say that from that list that Functional Programming techniques are used in mainstream every day. </p>\n'}, {'answer_id': 703551, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': "<p>Functional Programming will likely be a tool that is used by Engineers, Scientists to solve the problems that they are facing.  It isn't going to take the world like earlier langages.  However, the hard product to beat is Excel, if I am an engineer and need to do calculations, Excel is awesome.</p>\n\n<p>However, F# is going to be another source and will likely fill design needs by the non-Computer Scientists.  Let's face it, Computer Scientists have done a great job of creating a WHOLE new way of doing things.  Object Oriented Programming is GREAT.  But sometimes you just need a way to solve an equation, get a solution and graph it.  That's it.  Then a language like F# fills the bill.  Or maybe you want to build a finite state machine, F# again could be one of the solutions, but then C could be a solution as well.</p>\n\n<p>But when it comes to parallel processing, Excel shines and in time F# will be there as well.  In a friendly manner though, F#= friendly.</p>\n"}, {'answer_id': 712863, 'author': 'Ingo', 'author_id': 86604, 'author_profile': 'https://Stackoverflow.com/users/86604', 'pm_score': 2, 'selected': False, 'text': "<p>A point missed in the discussion is that the best type systems are found in contemporary FP languages. What's more, compilers can infer all (or at least most) types automatically.</p>\n\n<p>It is interesting that one spends half the time writing type names when programming Java, yet Java is by far not type safe. While you may never write types in a Haskell programm (except as a kind of compiler checked documentation) and the code is 100% type safe.</p>\n"}, {'answer_id': 915190, 'author': 'lhahne', 'author_id': 101419, 'author_profile': 'https://Stackoverflow.com/users/101419', 'pm_score': 0, 'selected': False, 'text': '<p>Microsoft is really pushing F# with the next version on Visual Studio. It is a hybrid language such as Scala and integrates very nicely with the rest of the .net framework. I think a lot of Microsoft shops are going to use it to speed-up the development of highly parallel data-processing applications and functions.</p>\n'}, {'answer_id': 916509, 'author': 'RHSeeger', 'author_id': 26816, 'author_profile': 'https://Stackoverflow.com/users/26816', 'pm_score': 1, 'selected': False, 'text': "<p>I have a hard time envisioning a purely functional language being the common language of the day, the reasons for which I won't get in to (because they're flame fodder). That being said, programming in a functional way can provide benefits no matter the language (if it allows such). For me, it's the ability to test my code much easier. I work with databases a lot... I tend to:</p>\n\n<ol>\n<li>write a function that takes data, manipulates it, and returns data</li>\n<li>write a dead simple wrapper that calls the database and then returns the result of passing that data through my function</li>\n</ol>\n\n<p>Doing so allows me to write unit tests for my manipulation function, without the need to create mocks and the like.</p>\n\n<p>I do think purely functional languages are very interesting... I just think it's what we can learn from them that matters to me, not what we can do with them.</p>\n"}, {'answer_id': 1440354, 'author': 'RD1', 'author_id': 175097, 'author_profile': 'https://Stackoverflow.com/users/175097', 'pm_score': 3, 'selected': False, 'text': "<p>I'd point out that everything you've said about functional languages, most people were saying about object-oriented langauges about 20 years ago.  Back then it was very common to hear about OO:</p>\n\n<pre><code>* The average corporate programmer, e.g. most of the people I work with, will not understand it and most work environments will not let you program in it\n* It's not really taught at universities (or is it nowadays?)\n* Most applications are simple enough to be solved in normal IMPERATIVE ways\n</code></pre>\n\n<p>Change has to come from somewhere.  A meaningful and important change will make itself happen regardless of whether people trained in earlier technologies take the opinion that change isn't necessary.  Do you think the change to OO was good despite all the people that were against it at the time?</p>\n"}, {'answer_id': 1666239, 'author': 'wishi', 'author_id': 59300, 'author_profile': 'https://Stackoverflow.com/users/59300', 'pm_score': 0, 'selected': False, 'text': '<p>I personally think for distributed systems and multi-threaded/parallel programming functional programming will have a break-through soon. As long as it integrates with existing OOP paradigms through programming libraries. So... the purely functional approach - in my opinion - will remain academic. </p>\n'}, {'answer_id': 1688022, 'author': 'Ken Bloom', 'author_id': 197788, 'author_profile': 'https://Stackoverflow.com/users/197788', 'pm_score': 0, 'selected': False, 'text': "<p>Functional programming has been around for a long time, since LISP was one of the earliest languages to have a compiler, and since MIT's LISP machines. It's not a new paradigm (OO is much newer) but the dominant software platforms have tended to be written in languages that translate easily to assembly language, and their APIs heavily favor imperative code (UNIX with C, Windows with C, and Macintosh with Pascal and later C).</p>\n\n<p>I think the new innovation in the last few years is for a diversity of APIs to catch on, particularly for things like web development where the platform APIs are irrelevant. Since you're not coding directly to the Win32 API or the POSIX API, that gives people the freedom to try out functional languages.</p>\n"}, {'answer_id': 3416040, 'author': 'shawndumas', 'author_id': 64275, 'author_profile': 'https://Stackoverflow.com/users/64275', 'pm_score': 4, 'selected': False, 'text': '<p>Man cannot understand the perfection and imperfections of his chosen art if he cannot see the value in other arts. Following rules only permits development up to a point in technique and then the student and artist has to learn more and seek further. It makes sense to study other arts as well as those of strategy.</p>\n\n<p>Who has not learned something more about themselves by watching the activities of others? To learn the sword study the guitar. To learn the fist study commerce. To just study the sword will make you narrow-minded and will not permit you to grow outward.</p>\n\n<p>-- Miyamoto Musashi, "A Book of Five Rings"</p>\n'}, {'answer_id': 3928305, 'author': 'Coyote21', 'author_id': 269494, 'author_profile': 'https://Stackoverflow.com/users/269494', 'pm_score': -1, 'selected': False, 'text': "<p>I don't think that functional languages will solve anything, and that this is just a hype that management is trying to sell, remember the only truth:</p>\n\n<p>There is no silver bullet.</p>\n\n<p>All the rest, is bullshit, also they've said that OO would solve our problems, that Web Services would solve our problems, that Xml would solve our problems, but in the end the above truth applied, and everything went down. Also, twenty years from now on, who says that we will be using binary computers at all? Why not quantic computers? No one can predict the future, at least not on this planet. (That is the second truth)</p>\n"}]
['https://Stackoverflow.com/questions/36504', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/655/']