Steve yegge wrote an article called “Execution in the Kingdom of Nouns” back in 2006, 14 years later I still find the points he made valid. For example, “Action is what gives life its spice… (but) Object Oriented Programming puts the Nouns first and foremost” … nouns are things, and things are prized beyond all actions in the Kingdom of Java.
The example he used still resonates with me. Most of time when I write the a piece of codes to do a task, it normally consists of a serial of actions. Using his example of taking out the garbage to illustrate the the point,
/*To take out the the garbage*/ get the garbage bag from under the sink carry it out to the garage dump it in the garbage can wash my hands get back to my couch ...
what I need here are a serial of actions, not a serial of nouns like
A GarbageDisposalStrategy nouns, A GarbageDisposalDestinationLocator nouns for finding my way to the garage, A PostGarbageActionCallback nouns for putting me back on my couch. ...
I have seen too many codes with all kinds of manager classes, with public methods like run(), execute() or dothis().
So my question is what are the disadvantages of OOP, especially in java? And if you do read Steve yegge’s article, how much will you agree with him.
I also need to emphasize that my question is not to discuss/promote functional programming or to start a language war. I am fully aware that my question maybe seen as opinion-based or too broad. But the fact that 14 years later the problem is still here makes me ask this question.