2 ms·
If you ever have to write JavaScript, a fairly practical and widespread language, the functional paradigm proves to be highly useful.
by nine_k 10y ago
If you ever have to write JavaScript, a fairly practical and widespread language, the functional paradigm proves to be highly useful.
- Scarblac 10y agoBut luckily in newer versions, sane features like modules are introduced that are syntactic sugar over the trick with closures that have to be used to fake them. And things like Promises instead of passing callback functions everywhere. The functional paradigm in Javascript is used everywhere because that's all there was.
- crimsonalucard 10y agoI have used javascript extensively. I can tell you the functional paradigm is almost NEVER used in javascript. Javascript just contains libraries, features and concepts brought over from functional programming but I have never seen anyone program javascript functionally.. If a single one of your functions in javascript contains more than one imperative procedure you have exited the functional paradigm.