by mika9090 · 7y ago · 0 comments
The most telling sign is how many FP languages are in existence today. If it was such a good thing we wouldn't need them all. It is a mess that cause many other types of problems without any clear benefit.
I do get that many people like the FP paradigm, no two humans are alike and people will find different ways of thinking and reasoning about a problem more suitable. Which is OK. BUT it doesn't mean FP is a any better than OPP or vice versa.
Last I would like to point out how Python (OOP) obliterated R (FP) it the Data Science market although R enjoyed a head start of few years and was the Franca Lingua of statisticians.
Python didn't beat R because it's OO. It won because of its existing popularity (with many people learning it in their intro programming class) and the massive amounts of open source software built for it.
> People just don't have enough experience with Functional Programming to really know how awful it is
This is just anecdotal, but I've used a FP language full-time for the last two years with several other engineers and ramped others up on the codebase. It has its own challenges but it's significantly easier for me to reason about than OOP - less bugs, easier to maintain, easier to parse. I can't see myself ever willingly going back.
It might be helpful to know what problems you think FP has, if you have a significant amount of experience with it.
My point that it beat R although it is OOP. This is to show that OOP is not inherently bad. Many people find it useful to the point the 'preserved' advantages of FP are not worth the effort.
> This is just anecdotal ...
My anecdote story is very different than yours. To the point if one of my engineers will ever suggest FP again he will get fired on the spot.
If you are going to react so disproportionately to the mere suggestion of FP, I am sorry, it is difficult to take your anecdote or opinion seriously.
This is a silly argument. FP means only first-class functions and immutable values, and the vast majority of FP languages agree on those.
But there are many other design decisions for a programming language - type system, laziness, purity, homoiconicity, and whatever other features, paradigms or constraints people might find desirable. THIS is what explains the diversity of FP languages.
Btw, there's the exact same phenomenon in OOP languages. They all agree on classes, and differ on hundreds of other aspects.
Also, the question asked doesn’t actually care about FP. Go isn’t a functional language, bit neither is it OO.
My point regarding the number of FP languages that it is not a silver bullet, neither is OOP to be sure, but FP has its own set of problems hence the many different implementations.
Regarding OOP languages implementing classic FP features, which is true and a blessing! These are good features which IMHO gives more credit to OOP languages.
Making a new language doesn’t automaticly imply that some other language got something wrong.
Sadly, there seems to be almost no functional programming concepts supported that I'd use (map, filter, reduce, lambdas). I think the lack of generics and operator overloading might have something to do with that?