loading...

re: Why is functional programming gaining popularity? VIEW POST

FULL DISCUSSION
 
  1. Enough languages that are popular today have accrued important ideas from functional programming that the disparity is much lower now than it used to be. Going from C to Haskell is a big jump, but I was shocked at how similar Ruby and Common Lisp are. Even C++ and Java have lambdas now. JavaScript is popular and pervasive and has blatant roots in Scheme. Once you learn how to compose functional iterator methods like map, filter, etc, the inferiority of for loops becomes blatant (eg this is why I have little interest in go).
  2. There are FP options these days that aren't shrouded in mathspeak. JavaScript calls it a "function" rather than a "lambda", Elm calls it "union types" rather than "algebraic data types" gist.github.com/evancz/06fe634245a...
  3. FP has a basis in math, making it declarative and immutable. It turns out that most of the problems that most of us have with most of our programs simply disappear when we write code in a way that is congruent with this constraint. As evidence, I present the popularity of React.js
Code of Conduct Report abuse