Master the JavaScript Interview: What is Functional Programming?
Eric Elliott
9.6K36

Every time someone calls javascript a “purely functional language” I roll my eyes a little knowing the person has probably never used a functional language and thus has no actual point of comparison.

  1. There is nothing “pure” about javascript. It has functions. It has objects. It has constructors. Just because you prefer one style doesn’t make the others go away.
  2. It doesn’t have optimized tail call recursion, a critical, core feature of functional languages because they lack control structures like for\each and do\while in favor of “purely functional” recursive solutions. This would be a bad practice in javascript.
  3. Functional reactive is a pattern for a specific problem (event driven UIs). It is not a generalization programming paradigm nor is it the exclusive solution to it’s own problem domain.

I wish I knew where this disinformation started.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.