Re:Not Lisp again (2009)
by nine_k on Tuesday May 02, 2017 @01:45PM
(#14248663)
If you ever have to write JavaScript, a fairly practical and widespread language, the functional paradigm proves to be highly useful.
[ Parent
| on HN ]
But 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.
Re:Not Lisp again (2009)
by crimsonalucard on Tuesday May 02, 2017 @02:20PM
(#14249064)
I 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.