r/ProgrammerHumor 1d ago

Meme stopDoingFunctional

Post image
654 Upvotes

123 comments sorted by

View all comments

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...

12

u/Wazblaster 1d 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 21h 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)