OOP is not a failure. But overengineering is another thing. (Sometimes I heard "Never write static function/method! Do it in OOP way!", though it doesn't make the code simpler or cleaner)
OOP is not a failure. But overengineering is another thing. (Sometimes I heard "Never write static function/method! Do it in OOP way!", though it doesn't make the code simpler or cleaner)
In contrast, most (typed) FP languages support typeclasses / traits, which makes a lot of code considerably simpler.
For one, many implementations have actually different names (such as append/add/__setitem__ in python, or push_back/insert/operator[] in C++).
For another, data structures are important for efficiency. It doesn't make sense to abstract those. You shouldn't use an array where a tree or hashmap is more efficient, etc.
By contrast, look at how polymorphism in datastructures is actually done in C++, i.e. STL. That's not your typical OO approach.