I’ve seen some surprisingly fragile OOP solutions that require tons of internal knowledge about how the classes work. It seems to be a popular approach to writing code that just isn’t very flexible.
It requires you model your problem perfectly from the start, then it can work alright. But in reality you cannot know the future and when new requirements come in that don’t fit the model you created you are left in a crappy spot of needing to refactor everything or just cram it in however you can.
I’ve seen some surprisingly fragile OOP solutions that require tons of internal knowledge about how the classes work. It seems to be a popular approach to writing code that just isn’t very flexible.
It requires you model your problem perfectly from the start, then it can work alright. But in reality you cannot know the future and when new requirements come in that don’t fit the model you created you are left in a crappy spot of needing to refactor everything or just cram it in however you can.
I recently did some refactoring with injector and composition patterns already there and it was a breeze.
OOP isn’t bad but like anything it requires some care.