3 ms·
Have you ever used... A functional language? JavaScript has lambdas and functions, but I would hardly call it functional. Having types and immutability and patt
by dahfizz 7y ago
Have you ever used... A functional language? JavaScript has lambdas and functions, but I would hardly call it functional. Having types and immutability and pattern matching are pretty important. Being able to run multithreaded would also be very nice.
- harimau777 7y agoWith Lodash I also get currying and sort of pattern matching (via conditional execution). To be fair, I probably should have said that I was considering the situation when commonly used libraries are available. Immutability isn't enforced, but I have all the tools that I need to choose to handle data immutably. I completely agree with you on types though. I don't know that much about TypeScript, but perhaps it would help? You definitely have a point that functional programming would be much better in JS if these features were built in and/or enforced. However, the problem is: what's the alternative? Haskell/Clojure/Ocaml jobs aren't exactly common. And at least in terms of Haskell and Ocaml, I've found the syntax to be pretty arcane.