Classes have a bad rep at the moment, because it's easy to break things if you change a base class to do what you want, without taking all the ones into account that inherit from it. And it's even more frustrating if you cannot explain to the programmer who did it why that was very wrong.
Class hierarchies can be very big and complex. That's what they were designed to cope with. If you only look at a small piece and ignore the rest, you will break it. That's why things like anonymous functions are so popular: KISS and easy to understand. Because the scope is small and there are no dependencies.
Oh the same old FUD.
Non-OO code just hides the dependencies somewhere else. Local variables that gets passed from one function to the next function, and again to the next function, very many functions deep.... And if one of them changes.... The exact same issue.
Of course you can "flatten" your calling structure (Though sometimes depth may be the better solution / "no one shoe fits all"). But you can also create smaller, less dependent class hierarchies.
- They are a tool, like any other tool. You are responsible how you use them.
- 3rd party code may not be as you like it. But that issues exists with non-OO 3rd party code too.