4 ms·
I tend to agree. The “duck extends bird” examples sound good at first but they have done a lot of damage to OOP.
by Ididntdothis 7y ago
I tend to agree. The “duck extends bird” examples sound good at first but they have done a lot of damage to OOP.
- zmix 7y agoBut wasn't that how OOP was supposed to be, according to Alan Kay? That objects should have resembled real life objects, as close as possible and exchange messages with each other?
- hota_mazi 7y agoI find this a largely unsubstantiated claim, much like the "Once you learn BASIC, your brain is damaged beyond repair" from Dijkstra that is so depressingly repeated over and over, and which is complete nonsense. These are introductory metaphors that help people get up to speed with a complex concept. You refine your understanding of these as you become more expert on the subject.
- overgard 7y agoI definitely agree that like these things aren't going to cause any sort of lasting brain damage or something. It gets overwrought. I think that the taxonomy thing is kind of harmful though in that, as far as I can tell anyway, it only seems to be now that a lot of programmers are coming around to the idea that modelling things are taxonomies is less useful than other techniques. Some code sins are pretty easy to cleanup: if someone writes a function that's doing too many things, it's not too hard to break it up, or if someone names things badly, usually it's enough just to rename it to better concepts. But deep inheritance hierarchies are often a massive pain to clean up, if you can even clean it up at all (outside packages might come to depend on your weird structure for instance).
- Ididntdothis 7y ago"These are introductory metaphors that help people get up to speed with a complex concept. You refine your understanding of these as you become more expert on the subject." From my experience a lot of people get stuck with these introductory metaphors and never progress further. That's why I think they are harmful.