<p>Lisp developed a set of interesting language features quite early on in the academic world, but most of them never caught on in production environments.</p>

<p>Some languages, like JavaScript, adapted basic features like garbage collection and lexical closures, but all the stuff that might actually change how you write programs on a large scale, like powerful macros, the code-as-data thing and custom control structures, only seems to propagate within other functional languages, none of which are practical to use for non-trivial projects.</p>

<p>The functional programming community also came up with a lot of other interesting ideas (apart from functional programming itself), like referential transparency, generalised case-expressions (ie, pattern-matching, not crippled like C/C# switches) and curried functions, which seem obviously useful in regular programming and should be easy to integrate with existing programming practice, but for some reason seem to be stuck in the academic world forever.</p>

<p>Why do these features have such a hard time getting adopted? Are there any modern, practical languages that actually learn from Lisp instead of half-assedly copying "first class functions", or is there an inherent conflict that makes this impossible?</p>

[{'answer_id': 75349, 'author': 'sblundy', 'author_id': 4893, 'author_profile': 'https://Stackoverflow.com/users/4893', 'pm_score': 3, 'selected': False, 'text': '<p><a href="http://www.scala-lang.org" rel="nofollow noreferrer">Scala</a> is a cool functional/OO language with pattern matching, first class functions, and the like. It has the advantage of compiling to Java bytecode and inter-operates well with Java code.</p>\n'}, {'answer_id': 75358, 'author': 'Josh', 'author_id': 11702, 'author_profile': 'https://Stackoverflow.com/users/11702', 'pm_score': 2, 'selected': False, 'text': '<p>Have you checked out <a href="http://research.microsoft.com/fsharp/fsharp.aspx" rel="nofollow noreferrer">F#</a></p>\n'}, {'answer_id': 75406, 'author': 'Mendelt', 'author_id': 3320, 'author_profile': 'https://Stackoverflow.com/users/3320', 'pm_score': 2, 'selected': False, 'text': "<p>Lot's of dynamic programming languages implement ideas from functional programming. The newer .Net languages (C# and VB) have what they call lambda's but these aren't side effect free.</p>\n\n<p>It's not difficult combining concepts from functional programming and object oriented programming for example but it doesn't always make a lot of sense. Object oriented languages (try to) encapsulate state inside objects while functional languages encapsulate state inside functions. If you combine objects and functions in one language it gets harder to make sense of all this.</p>\n\n<p>There have been a lot of languages that have combined these paradigms by just throwing them together (F#) and this can be usefull but I think we still need a couple of decades of playing with languages like this untill we can create a new paradigm that succesfully will combine the ideas from oo and functional programming.</p>\n"}, {'answer_id': 75448, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': '<p>C# 3.0 definitely does.</p>\n\n<p>C# now has </p>\n\n<ol>\n<li>Lambda Expressions</li>\n<li>Higher Order Functions </li>\n<li>Map / Reduce + Filter ( Folding?) to lists and all types which implement IEnumerable.</li>\n<li>LINQ</li>\n<li>Object + Collection Initializers.</li>\n</ol>\n\n<p>The last two list items may not fall under proper functional programming, anyways the answer is C# has implemented many useful concepts from Lisp etc.</p>\n'}, {'answer_id': 75514, 'author': 'Paul Reiners', 'author_id': 7648, 'author_profile': 'https://Stackoverflow.com/users/7648', 'pm_score': 3, 'selected': False, 'text': '<p>Python or Ruby.  See Paul Graham\'s <a href="http://www.paulgraham.com/lispfaq1.html" rel="nofollow noreferrer">thoughts on this</a> in the question "I like Lisp but my company won\'t let me use it. What should I do?".</p>\n'}, {'answer_id': 75638, 'author': 'Christopher Cashell', 'author_id': 13091, 'author_profile': 'https://Stackoverflow.com/users/13091', 'pm_score': 2, 'selected': False, 'text': "<p>Lua.</p>\n\n<p>It's used as a scripting/extension language for a number of games (like World of Worcraft), and applications (Snort, NMAP, Wireshark, etc).  In fact, according to an Adobe developer, Adobe's Lightroom is over 40% Lua.</p>\n\n<p>The guys behind Lua have repeatedly listed Scheme and Lisp as major influences on Lua, and Lua has even been described as Scheme without the parentheses.</p>\n"}, {'answer_id': 75736, 'author': 'nlucaroni', 'author_id': 157, 'author_profile': 'https://Stackoverflow.com/users/157', 'pm_score': 4, 'selected': False, 'text': '<blockquote>\n  <p><em>Are there any modern, practical\n  languages that actually learn from\n  Lisp instead of half-assedly copying\n  "first class functions", or is there\n  an inherent conflict that makes this\n  impossible?</em></p>\n</blockquote>\n\n<p>Why aren\'t lisp, haskell, ocaml, or f# modern?</p>\n\n<p>You might just need to take it on yourself and look at them and realize that they are more robust,  with libraries like java, then you\'d think.</p>\n\n<p>A lot of features have been adopted from functional languages to other languages. But vice versa -- (some) functional languages have objects, for example.</p>\n'}, {'answer_id': 76259, 'author': 'Luís Oliveira', 'author_id': 2967, 'author_profile': 'https://Stackoverflow.com/users/2967', 'pm_score': 3, 'selected': False, 'text': '<p>Common Lisp, used in the real-world albeit not wildely so, I guess.</p>\n'}, {'answer_id': 76297, 'author': 'Daniel Spiewak', 'author_id': 9815, 'author_profile': 'https://Stackoverflow.com/users/9815', 'pm_score': 3, 'selected': False, 'text': '<p>Scala is the absolute king of languages which have adopted significant academic features.  Higher kinds, self types, polymorphic pattern matching, etc.  All of these are bleeding-edge (or near to it) academic research topics that have been incorporated into Scala as fundamental features.  Arguably, this has been to the detriment of the langauge\'s simplicity, but it does lead to some very interesting patterns.</p>\n\n<p>C# is more mainstream than Scala, but it also has adopted fewer of these "out-there" functional features.  LINQ is a limited implementation for Wadler\'s generalized list comprehensions, and everyone knows about lambdas.  But for all that, C# (rightfully) remains a bit conservative in adopting research features from the academic world.</p>\n'}, {'answer_id': 76369, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 3, 'selected': False, 'text': '<p>Erlang has recently gained renewed exposure not only through being used by Twitter, but also by the rise of XMPP driven messaging and implementations such as ejabberd. It sports many of the ideas coming from functional programming being a language designed with that in mind. Initially used to run Telephone switches and conceived by Ericson to run the first GSM networks. It is still around, it is fully functional (as a language) and used in many production environments. </p>\n'}, {'answer_id': 76413, 'author': 'ima', 'author_id': 5733, 'author_profile': 'https://Stackoverflow.com/users/5733', 'pm_score': 2, 'selected': False, 'text': '<p>In addition to what was said, a lot of LISP goodness is based on guaranteed lack of side-effects and using built-in data structures. Both rarely hold in real world. ML is probably better functional base.</p>\n'}, {'answer_id': 78137, 'author': 'drewr', 'author_id': 3227, 'author_profile': 'https://Stackoverflow.com/users/3227', 'pm_score': 3, 'selected': False, 'text': '<p>I suggest you try <a href="http://clojure.org" rel="noreferrer">Clojure</a>. Syntactically beautiful dialect, functional (in the ML sense), and <em>fast</em>.  You get immutability, software transactional memory, multiversion concurrency control, a REPL, SLIME support, and an inexhaustible FFI.  It\'s the Lisp (&amp; Haskell) for the Business Programmer.  I\'m having a great time using it daily in my real job.</p>\n'}, {'answer_id': 79009, 'author': 'jfm3', 'author_id': 11138, 'author_profile': 'https://Stackoverflow.com/users/11138', 'pm_score': 3, 'selected': False, 'text': '<p>There is no known correlation between a language "catching on" and whether or not is has powerful, well researched, well designed features.</p>\n\n<p>A lot has been said on the subject.  It exists all over the place in technology, and also the arts.  We know artist A has more training and produces works of greater breadth and depth than artist B, yet artist B is far more successful in the marketplace.  Is it because there\'s a zeitgeist?  Is is because artist B has better marketing?  Is it because most people won\'t take the time to understand artist A?  Maybe artist B is secretly awful and we should mistrust experts who make judgements about artists?  Probably all of the above, to some degree or another.  </p>\n\n<p>This drives people who study the arts, and people who study programming languages, crazy.</p>\n'}, {'answer_id': 188105, 'author': 'Thedric Walker', 'author_id': 26166, 'author_profile': 'https://Stackoverflow.com/users/26166', 'pm_score': 1, 'selected': False, 'text': '<p>Another "real-world" language that implements functional programming features is Javascript. Since absolutely everything has a value, then high-order functions are easily implemented. You also have other tenants of functional programming such as lambda functions, closures, and currying.</p>\n'}, {'answer_id': 216232, 'author': 'J D', 'author_id': 13924, 'author_profile': 'https://Stackoverflow.com/users/13924', 'pm_score': 0, 'selected': False, 'text': '<p>The features you refer to ("powerful" macros, the code-as-data thing and custom control structures) have not propagated within other functional languages. They died after Lisp taught us that they are a bad idea.</p>\n\n<p>Modern functional languages (OCaml, Haskell, Erlang, Scala, F#, C# 3.0, JavaScript) do not have those features.</p>\n\n<p>Cheers,\nJon Harrop.</p>\n'}, {'answer_id': 216273, 'author': 'David Hicks', 'author_id': 3653, 'author_profile': 'https://Stackoverflow.com/users/3653', 'pm_score': 2, 'selected': False, 'text': '<blockquote>\n  <p>Lisp developed a set of interesting language features quite early on in the academic\n  world, but most of them never caught on in production environments.</p>\n</blockquote>\n\n<p>Because the kind of people who manage software developers aren\'t the kinds of people who you can have an interesting chat comparing different language features with. Around 2000, I wanted to use LISP to implement XML-to-HTML transforms on our corporate website (this is around the time of Amazon implementing their backend in LISP). I didn\'t get to. This is mildly ironic seeing as the company I was working for made and sold a <a href="http://en.wikipedia.org/wiki/LispWorks" rel="nofollow noreferrer">Common LISP environment</a>.</p>\n'}]
['https://Stackoverflow.com/questions/75303', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4607/']