This is an interesting question, and while I reject the argument that FP is "better" than OOP I think it's worth discussing complex forces at play here. First of all, what do we mean by OOP and FP? They're not clear-cut definitions, especially when you talk about ecosystems! https://twitter.com/ashprakasan/status/1296351013222326273
Most people these days talk about a specific branch of FP: immutable, inferred static types. But this is a latecomer in FP! It stems from ML in 1976, which started off as a proof-assistant language. Arguably the first popularizer was Miranda in 1985. Before that, FP = Lisp & APL.
OOP comes from SIMULA-67, almost decade before ML, and was immediately popular from the start. While CLU (1975) and Smalltalk-80 had a major influence on OOP, they were influencing a mostly-coherent paradigm, meaning OOP had a head start on modern FP.
So OOP comes out earlier than ML, in the time when FP still meant LISP and APL. But OOP wasn't actually competing with them.

They were all competing with COBOL.
It's hard to understand now just how big a deal COBOL was. For a long time, it was the dominant language in the world. The only thing that toppled it was C, and only because of the Unix era. APL, Lisp, OOP languages were all in competition with COBOL (and FORTRAN, and algols)
Here's some unfounded theory on my part: while OOP was a totally new conceptual model, it was a conceptual model that was much closer to the COBOL model than LISP and APL were. So it was easy for entrenched companies to switch to OOP languages from their legacies.
In support of this, I offer that C++ is the only OOP language that survived the Javapocalypse. I propose it survived because 1) it was a lot faster, and 2) it was closer to C, so was easier for people to migrate C -> C++ versus C -> Java.
Speaking of Java: people usually blame OOP's popularity on Java. This confuses cause and effect. Java rode the wave of OOP popularity, killing off Smalltalk, Beta, Self, Eiffel, Ada, Object Pascal, and a dozen others I can't remember. UML was formalized before Java ever existed!
For the record, this was all around 1994-1995. SML and Haskell, the two representative incarnations of typed FP, were 1990. OOP was already the dominant paradigm, enough so for it to have a mass extinction, by the time typed FP got its boots on.
Right now typed FP has the momentum, but its dominance is not a certainty. Maybe we'll get into logic programming. Maybe another branch of OOP will get cool again. Likely FP's ideas will be absorbed into the multiparadigm Frankensteins, as is already happening.
(And what about the other branches of FP, the Lisps and APLs? Lisp is having a renaissance with Clojure, but the s-expression syntax seems like the eternal albatross around Lisp's neck. APL has been slowly scavenged by science and data things like Numpy and Julia.)
One thing I don't cover there nearly as much as I should have is why message passing is genuinely an innovative and powerful development over virtual dispatch and function calls
You can follow @hillelogram.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled:

By continuing to use the site, you are consenting to the use of cookies as explained in our Cookie Policy to improve your experience.