5 ms·
I do not think it is reasonable to call JS a Functional programming language.
by skavi 4y ago
I do not think it is reasonable to call JS a Functional programming language.
- throwawaymaths 4y agoNo but it popularized practical functional programming through react.
- imtringued 4y agoReact functional components have nothing to do with functional programming. Hooks are stored in global variables.
- throwawaymaths 4y agoIs Erlang functional programming? Anything in an Ets table is a global variable. There's even mutable state hiding in the process dictionary! You might have to access a database, which is global state! The horrors!
- zelphirkalt 4y agoIn Joe Armstrong's own words: Erlang is either the most object-oriented or the least object-oriented language. It also very much discourages mutation and favors pattern matching and pure functions, so I would say it is quite FP in nature.
- kaba0 4y agoAnd Haskell compiles down to C- as a step, which is as imperative as it gets. I don’t see how an implementation detail determines the degree of FP.
- zelphirkalt 4y agoReact does have little to do with it, I would say. Its components are quite the opposite of FP actually. They are closer to OOP bundling state and behavior together.