Re:Goodbye, shitty Car extends Vehicle object-orientation tu...
by rdiddly on Saturday October 19, 2019 @10:04PM
(#21301922)
Oh my god, not all birds fly, it ruins the whole thing!!!!!
No, it's a perfectly fine place in the analogy, to have a teachable moment. Since not all birds fly, just don't make flight part of your base class. I mean? Or get clever and have flighted and flightless bird classes inherit from Bird? If you want to be that much of a pain about it, you can; the paradigm supports it.
No, it's a perfectly fine place in the analogy, to have a teachable moment. Since not all birds fly, just don't make flight part of your base class. I mean? Or get clever and have flighted and flightless bird classes inherit from Bird? If you want to be that much of a pain about it, you can; the paradigm supports it.