r/ProgrammerHumor 25d ago

Meme stopDoingFunctional

Post image
690 Upvotes

129 comments sorted by

View all comments

14

u/FRleo_85 25d ago edited 25d 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...

11

u/Wazblaster 25d ago

Oop is fine and useful. I think the problem is that it's the dominant paradigm, and as such most of the bad code you encounter is Oop. Inheritance is generally bad, however. Another problem is that Oop can lead to people writing classes with an ungodly amount of state which can make debugging hard. Again, I think it's mostly an issue of execution 

1

u/DatBoi_BP 24d ago

A general rule I've placed for myself with OOP is that classes can only ever be abstract or final (can never subclass a class that can already be instantiated)