News for hackers. Stuff that matters.
Re:Goodbye, shitty Car extends Vehicle object-orientation tu... by Ididntdothis on Saturday October 19, 2019 @11:24AM (#21298946)
I tend to agree. The “duck extends bird” examples sound good at first but they have done a lot of damage to OOP.
Re:Goodbye, shitty Car extends Vehicle object-orientation tu... by hota_mazi on Saturday October 19, 2019 @01:33PM (#21299620)
I 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.

Re:Goodbye, shitty Car extends Vehicle object-orientation tu... by overgard on Saturday October 19, 2019 @03:29PM (#21300247)
I 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).

Re:Goodbye, shitty Car extends Vehicle object-orientation tu... by Ididntdothis on Saturday October 19, 2019 @09:56PM (#21301885)
"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.

Re:Goodbye, shitty Car extends Vehicle object-orientation tu... by zmix on Saturday October 19, 2019 @01:21PM (#21299548)
But 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?