Goodbye, shitty Car extends Vehicle object-orientation tutorial (2011)
<i>>In good OO programming, we don’t make class hierarchies in order to satisfy our inner Linnaeus.</i><p>This correctly identifies one of the worst problems with how people construct OO programs when they get out of college. They are infected with the idiotic desire to make neat taxonomies. They don't know why. They can't even explain the rules that make one taxonomy good and another one bad. They just feel some immense pressure to arrange things in trees. I've been like that when initially learning Java and it took a while to recover from it. It's like fucking brain damage from bad examples.<p>Inheritance is not about creating taxonomies.<p>Namespaces are not about creating taxonomies.<p>Both are practical solutions to practical problems that occur when writing code.<p>Inheritance is a result of several insights:<p>1. It's convenient to be able to sketch out a protocol which a set of objects will follow - without having to work out every damn detail about its implementation.<p>2. Most of the protocol can be implemented once and then reused.<p>3. Often you want to use the default protocol implementation <i>with some changes</i>. Instead of re-implementing the rest of the protocol, it's highly convenient to be able to specify only the differences.<p>#3 is the core reason why inheritance was developed.