3 ms·
> It can be so difficult to answer the question, "What happens when I call this method on this instance?" that a 10-min edit takes a full day. The code is basic
by rumanator 6y ago
> It can be so difficult to answer the question, "What happens when I call this method on this instance?" that a 10-min edit takes a full day. The code is basically frozen for fear of breaking something
That's not a OO problem, that's a software engineering and code quality problem.
Modularity/compartmentalization and the obligation of managing complexity are basic age-old principles. You'll arrive to a big ball of mud if you are oblivious to these basic principles, whether you do inheritance or composition.
Don't pin the blame on a programming paradigm if your developers are clueless about basic software engineering principles.
- smt88 6y ago> Don't pin the blame on a programming paradigm if your developers are clueless about basic software engineering principles. You can write OO code without inheritance. Inheritance is syntactical sugar, essentially. You can accomplish the same things with interfaces and composition. The difference between composition and inheritance is that a composed method is fully discoverable. I can see every statement. There's no secret parent method running before or after.