2 ms·
OOP != class hierarchies. Unfortunately when the industry shifted from procedural programming to OO they chose C++ and Java. These languages are mostly procedur
by jacobsenscott 4y ago
OOP != class hierarchies. Unfortunately when the industry shifted from procedural programming to OO they chose C++ and Java. These languages are mostly procedural languages with classes bolted on. They pretty much forced you to write hierarchies - it was the only way to get the good parts of OO - loose coupling, polymorphism, inversion of control, etc. Since inheritance was the only tool in the toolbox industry programmers naturally were driven to try and leverage inheritance for everything even though it is the worst part of OO.
Modern multi-paradigm langues do a much better job of letting you use OO when OO works, functional when functional works, etc.
You should use the tool that works when it works. I do plenty of functional and OO programming in ruby, declarative programming in SQL, mostly functional style in JS. There are plenty of places where each one works great.