3 ms·
Only when there's a blatantly obvious reason to. The example that immediately comes to mind is GUI elements: there's both a lot of code that many similar-but-di
by gary_0 6y ago
Only when there's a blatantly obvious reason to. The example that immediately comes to mind is GUI elements: there's both a lot of code that many similar-but-different class instances share, and a strong "is-a" semantic. Even then, most of the hierarchy is only 1 level deep (Button -> Element).
Flat is better than nested.