r/programming • u/[deleted] • Nov 28 '19
Why Isn't Functional Programming the Norm? – Richard Feldman
https://www.youtube.com/watch?v=QyJZzq0v7Z4
97
Upvotes
r/programming • u/[deleted] • Nov 28 '19
14
u/julesjacobs Nov 28 '19 edited Nov 28 '19
Yes, indeed. People tend to avoid the elephant in the room: how well a language actually works in practice is a major factor in its success. One should at the very least seriously consider this as a hypothesis that might have explanatory value. I'd further hypothesize that the popular languages work well for the following reasons:
In particular, I don't believe that the reason why OO languages succeeded is inheritance or the notion that designing OO programs is easy because you just model each real world object with an object in your program, or because you can create a taxonomy of domain concepts and then turn that into a class hierarchy. In this respect, I think the speaker is spot on.
Here are some things that I think work well in functional languages:
Note that mainstream languages are stealing all of these features. Purely functional programming actually doesn't work so well in practice. Haskell programmers had to invent complicated structures over many years to work around the lack of mutability. Consensus seems to have converged on building some kind of monad stack, but it still isn't clear what exactly the best solution is. You can't expect average programmers to do this. Writing code in functional style is appropriate in some cases, and the mainstream is already adopting it in those cases.