OOP Is Not Dead. You're Just Using It Like a Hammer on a Keyboard
A defense of object-oriented programming arguing that OOP itself is not the problem -- the real issue is developers misapplying it by following textbook patterns without understanding the underlying engineering principles.
After every new article headlined "OOP is a scam," I want to remind people: OOP is not a set of patterns from textbooks -- it's an engineering approach. If your project suffers from inheritance and DI, perhaps the problem isn't with OOP. It's with how you're applying it.
"Nobody Knows What OOP Is"
This is true. Everyone interprets it differently. Even Alan Kay himself, the man who coined the term, isn't too happy with what it's all become:
"OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things."
-- Alan Kay
But OOP is not a set of dogmas. It's a way of saying: "This thing has state and behavior, and I want them to go together." Not always necessary, but often helpful.
"All the Textbook Examples Are Cats and Dogs"
Well, of course. Nobody is going to demonstrate a CQRS pattern with Event Sourcing at a job interview. They show Animal because it's simple.
That's not a guide to action. It's an illustration. Like for (int i = 0; i < 10; i++) -- you don't think all code should look like that, do you?
"DTOs Back and Forth, and the Methods Are Pure Anyway"
Yes, and that's great. Encapsulation isn't magic. It's simply "keep your data under control."
You don't need to stuff behavior into every class. Sometimes a class is just a container. But when an object has logic that depends on its state -- that's when OOP works for you.
"GoF Patterns Are Crutches"
That's right. But they're good crutches. Battle-tested over time.
"The point of OOP is to manage dependencies, not to model cats and dogs."
-- Robert C. Martin
Yes, you can replace Strategy with a Func. But should you throw out the idea just because the syntax got simpler?
"Interfaces Multiply, DI Is Magic, Everything Is Complicated"
It's complicated when you do things "by the book" without understanding why. An interface exists so you don't depend on the implementation. DI exists so you don't have new in every method.
"SRP doesn't say you need tiny classes. It says a class should have one reason to change."
-- Robert C. Martin
"OOP Isn't Needed: Look at Linux"
Of course, in the Linux kernel there's no room for polymorphism. It's system code where predictability and speed matter. But if you're writing code that 10 people maintain and modify for years -- interfaces, classes, and tests will make your life easier.
"All successful software gets changed. And object-oriented design helps you manage that change."
-- Grady Booch
Instead of a Conclusion
OOP is not a silver bullet. But if you're cutting code rather than playing darts with it -- it can help enormously. Not because it's trendy, but because it lets you think about behavior without losing structure.
A tool is good when it's used for its intended purpose.