3 ms·
Personally I'd add the code to "TrackedObject" rather than "Duck" just in case we ever wanted to track geese or cormorants. I don't get the impression that the
by hugh3 15y ago
Personally I'd add the code to "TrackedObject" rather than "Duck" just in case we ever wanted to track geese or cormorants.
I don't get the impression that the person who wrote this ever had to seriously teach software development to software developers. Simplistic metaphors are used so frequently for this kind of thing because it prevents the learner from having to ascend more than one conceptual hurdle at a time.
Perhaps, though I think his real point is that often folks teaching software development will only put out that first hurdle and forget about the rest. Teach 'em that "ducks are animals" and think they understand inheritance, when in fact these simple physical analogies are a bad way of understanding how and why you might use inheritance in the real world.
I think it's a phenomenon quite common across the whole OO pedagogy, in fact. If your only mental examples of "objects" are ducks and bicycles then you're going to get pretty confused when you escape simple example land and start trying to understand the difference between an NSView and an NSViewController.