In OP's article, OO is filed under "what works", which I strongly disagree with. If anything, software development works DESPITE OO, which in my experience constantly hinders progress because of rigid architectures.
Not sure what it is like for the industry at large, but from what I've seen a dominant paradigm in Java is to separate out model classes that are basically just structs with Service or Workflow classes that manipulate the data. It's questionable how much of that is still OO (at least when I started learning it the narrative was to put your code where your data is. POJOs are the opposite of that). Given say having a high level service that calls low level services and external system while returning a result produces code thats very easy to trace and provides solid abstraction to the calling code. Also if you've read Uncle Bob's data structure vs. Object dichotomy you'll see how Objects are objectively better in some scenarios, and OO languages give you powerful tools for objects.
That said 100% agree with you on horrible inheritance hierarchies. What I think would be best is some course on how to combine OO and FP paradigms to get the best of both worlds (though tbh it'd probably be 90% FP with some OO).
If you want to find out, read "Concepts, Techniques, and Models of Computer Programming". It's mindblowing. It answers that question exactly.
This is a dense but exceptionally written 1000 page book, but maybe you can just read section 4.8.5 to get an idea [1]. However, I think you will take more than just reading this bit, to understand the different models (many more than the 2 everybody talks about).
Section 4.8.7 is actually "Using different models together", with the key "impedance matching" concept.
The author sort of summarizes it here [2]
There is also a mooc in edx, but it just scratches the surface of what's in the book [3]
[1] https://books.google.com.vn/books?id=_bmyEnUnfTsC&pg=PA322&l...
FP is less popular and tends to attract a more curious crowd, who is more willing to learn how to use it well, whereas OO languages are used by everyone.
On top of that, OO is build on top of a more expressive computation model, the stateful one, which because of its power is much more difficult to use well (and easier to abuse) than the much simpler functional/declarative model.
That's similar to what proponents of communism have been saying - "it does work if you do it right". The problem is that things start breaking down as soon as the project scale. For small programs a pure OO model can work, but increased complexity means people will definitely switch to a hybrid OO-(procedural|functional) style, simply because pure OO is untenable in large codebases.
-Scala was intended to have strong FP and OO support from day 1
-Scala has very strong support for immutable values and persistent data structures. It's hard to do FP efficiently without these
-Similarly, Scala has built in support for laziness to a significantly greater extent than most languages. This is arguably important because it supports immutability, there are some important mutable algorithms that have no efficient immutable equivalent without laziness
-Strong lambdas (unlike, e.g., Python)
-Many of the major Scala libraries are either written in a heavily functional style or support highly functional APIs, while libraries in most languages do not
I'd say it's a language whose issues are sometimes something that FP is best at papering over, but as an FP language, it is quite lacking if you're used to something like Haskell, Erlang, or Lisp. I actually put it in the category of OO-FP languages, languages that have a lot of the FP constructs (especially from when Lisp was the epitome of FP) but are primarily object-oriented languages. It's a pretty decent paradigm, but it really ought to be distinguished from FP languages where there are no OO features in them at all, or much more rarely, where they are clearly second-class.
JS doesn't really support traditional inheritance either, so describing it as OO seems odd to me.
And even within my ecumenicalism, I consider inheritance in the strictly C++/Java sense of relatively little importance, and dropping. Rather than being essential, it turns out to have been accidental, and also arguably a mistake, even on purely OO grounds.
Just one thing: when you write that Ruby script, could one of the reasons why you don't use a FP style be not only that maybe it wouldn't be natural to do so in Ruby, but also that it's unsuitable for the kind of problem you are trying to solve with that script to begin with?
I mention this, because I have the impression that people tend to believe that to solve a programming problem you should use whatever paradigm is perceived as the main one for the language at hand. However, I believe that it's the problem that should dictate the paradigm.
But the thing is, what if you are stuck with a given language, and/or its a biggish complex project where different aspects are better solved with different paradigms?
Just because something isn't "the most popular" doesn't mean that thing doesn't work.
FP is by no means restricted to purely functional languages. My impression is that the ideal approach is to use the paradigm most suitable for the problem/component at hand (principle of least expressivity), so I prefer multi-paradigm languages over pure ones, although of course I understand that there are domains where one can benefit from the optimizations made possible by purity.
Understanding how to do this requires much more of a learning effort, learning more concepts, techniques and idioms, which I suspect is why FP is still lagging; I don't believe it is for any fundamental reason.
The other thing is that there are many more programming paradigms than just functional and stateful.
I leave this article out whenever people start talking "OOP vs FP": https://eli.thegreenplace.net/2016/the-expression-problem-an...
Especially considering most programming languages have those neat helper methods or stdlib implementations that basically bring functional programming without changing the language much.
While purely Functional languages are definitely not mainstream, as he puts functional programming ideas are pretty mainstream. At the same time major OO languages like java have incorporated functional programming ideas, so arguably even Java is not purely Object Oriented anymore. It seems to me by his criteria that would also put OO as a no too.
If he comes from OO languages I think this is a bias because it is easy to take OO for granted and put strict requirements on foreign Functional Programming before accepting it as successful. However it seems to me the only criteria that should be needed to call either paradigm successful is if their ideas are are mainstream, which is true for both languages.
Basically if Function Programming ideas have gained currency then it should be regarded as successful.