5 ms·
Here are some reasons I can think of: * Parallelization and concurrency do seem to be easier in functional languages with immutable data. Not easier to write p
by thinkpad20 12y ago
Here are some reasons I can think of:
* Parallelization and concurrency do seem to be easier in functional languages with immutable data. Not easier to write per se, but easier to reason about.
* JavaScript was, as far as I can tell, arguably the first truly mainstream language to embrace first-class functions and closures. The ubiquity of JavaScript has exposed many to the benefits of such an approach. Similarly, Rails and other Ruby-based software make lots of use of functional programming through Ruby's do-blocks. These languages have made people more comfortable with first-class functions.
* Languages like Haskell, Scala and Clojure have shown that functional programming can be high-performance and one need not necessarily trade speed for expressiveness. Similarly, many scripting languages (and/or the hardware they run on) have become fast enough to allow for them to be used for high-performance applications.
* Functional programming is fun, and allows for beautiful and succinct code.
- sigil 12y ago> JavaScript was, as far as I can tell, arguably the first truly mainstream language to embrace first-class functions and closures. This is a nitpick, but Perl has had closures since the early 90s -- before Perl5 even.
- zoomerang 12y agoNot to mention Python and Ruby.
- Al__Dante 12y agoAnd Lisp :-)
- denibertovic 12y agoRuby doesn't have functions as first class citizens. Python does.
- yohanatan 12y agoThat's not a nitpick--that's getting the facts right.
- etler 12y agoIt really depends on your definition of what mainstream means when it comes to languages. I think you can both be right depending on the interpretation.