News for hackers. Stuff that matters.
Re:Goodbye, shitty "Car extends Vehicle" object-orientation ... by pbhjpbhj on Tuesday August 23, 2011 @04:36AM (#2915855)
>you can not add code to ducks //

[I'm in a bit over my head but] Sure you can. This is just the sort of thing that happens in such tutorials - "now lets make all our ducks say moo if they're speaking but on land at the time".

When I learnt OO we used frogs, in SmallTalk, as our analogy. I don't think I ever once thought that the "frog" was in some way limited to things frogs could do, only that it was representing a series of things with a particular relationship wherein those things could have different characteristics and behaviours.

There are no comments on this comment yet.