2 ms·
Agree. Almost always you have the option to place some functionality on the hierarchy somewhere, but actually composition would be better. To make matters more
by sly010 12y ago
Agree. Almost always you have the option to place some functionality on the hierarchy somewhere, but actually composition would be better.
To make matters more difficult, you have to make these kind of decisions very early before you write your code. By the time you properly understand the problem, you will have invested in a particular solution. There is N>3 ways to do things and there is only one best way, so chances are you are doing it the wrong way. OOP is not bad, it's just often misused.