|
|
|
|
|
by fbonetti
3898 days ago
|
|
Sure, Javascript has first class functions, which I guess meets the bare minimum requirements for being a functional language, but it also lacks some key features: * Pure functions - JS functions are essentially subroutines. They might return a useful value or they might mutate a bunch of stuff and interact with the outside world. Who knows? JS functions aren't guarunteed to return the same value, or any value at all. * Immutability - Anything and everything can be mutated in JS, including the contents of objects that are defined using the new ES6 `const` keyword * Curried functions by default - Although it's possible to compose or partially apply JS functions, it's not nearly as nice as Haskell or Elm. |
|