3 ms·
You may argue that it doesn't matter as concurrency and raising complexity will force everybody to go FP or be crushed under the complexity of other solutions.
by bunderbunder 14y ago
You may argue that it doesn't matter as concurrency and raising complexity will force everybody to go FP or be crushed under the complexity of other solutions. That may be fine argument for FP being inevitable...
Except that that argument would fall on the wrong side of history. Most the really big examples of successful high-concurrency systems are programmed using imperative languages, and have been all along. And they do it using mostly the same habits that a lot of FP advocates would like to suggest are the exclusive domain of functional languages. Personally I like to think of them less as an excuse for functional apotheosis than as "elementary coding standards", but I learned Lisp before C++ so perhaps I'm just showing my age there.
Now there are spots where FP offers a serious win on the concurrency front. Continuation passing comes to mind immediately. It'd be nice if the outspoken contingent of FP fans would spend a bit more time talking up node.js. But I suppose it's silly to expect Javascript to be held up as a successful functional language. It spends much too much time rubbing elbows with the object-oriented hoi polloi for that.
- smsm42 14y agoI think functional aspects of JS are awesome and are of great use in a lot of cases. However it definitely lacks the purity of languages like Haskell or Clojure - which in my view makes it 1000 times more useful (when measured by my productivity using that to achieve any practical task) but I guess in the eyes of purists it makes it irrelevant or unworthy.
- bunderbunder 14y agoI'm inclined to agree re: being more useful. Just shooting from the hip, I'm guessing the performance and scalability of node.js wouldn't be quite so good if it had used purely functional data structures to keep track of all those callbacks.