|
|
|
|
|
by mikestew
2949 days ago
|
|
How about: if you're peddling software design advice, take some time to make (or find) a realistic example so I don't have to imagine so hard. Somewhere around 1989 I swore that the next author of an OOP book that used animals as class examples was going to get an angry personal visit from me. "Suppose you have an Animal class. We subclass to a Cat, and add a Meow method..." If it wasn't animals, it was cars: "we'll subclass Car to create a Ford class, add a Horn property..." Because Customer/Vendor/Invoice was too commonplace? Between Customer classes and Animal classes, I'll give you a hint as to which I've created more instances of. |
|
Humming birds, I tell ya thank goodness for multiple inheritance! I was able to inherit from both birds and bees. It saved me a ton of work. There was the time I used the flying mixin on sharks though, that was such a mess to cleanup.