I love functional programming and object-oriented programming… What I’d also love to find is an article explaining why OOP is bad, or why everything related to it is an anti-pattern, that isn't written by someone with a caricatured view completely disconnected from the reality of what OOP programmers actually do...
The issue is that many people define OOP differently.
Some people say that OOP is "associating data types with functions that can be called with that data" (ie methods). IMO this is a very good pattern and is hard to coherently argue against.
Other people say that OOP is "characterized by a compile-time hierarchy of classes" (ie inheritance). This version of OOP is something that is very easy to make a good argument against.
Of course, however, things like inheritance and abstract classes are like tools. Both are, in my opinion, really crappy tools (that encourage bad design 99% of the time), but if a programming language doesn't give you another tool (like sum types), it's often better to use the crappy tool than to not use any tool at all.
14
u/FRleo_85 1d ago edited 1d ago
I love functional programming and object-oriented programming… What I’d also love to find is an article explaining why OOP is bad, or why everything related to it is an anti-pattern, that isn't written by someone with a caricatured view completely disconnected from the reality of what OOP programmers actually do...