News for hackers. Stuff that matters.
Re:Inheritance Is Terrible by manyxcxi on Saturday March 19, 2016 @05:26PM (#11320535)
I'm hazarding a guess- I've never looked into the teaching of CS, just been taught a lot of it.

I think it's because people just starting out are able to grasp the concept of a duck is a bird is an animal AND you can reduce the code you write by saying all animals walk, birds fly, and ducks quack. So you are building on from the parent class.

With interfaces you are saying all implementations of animals walking can be different, so you're going to have to write code for each one to this contract. You're not nexessarily suggesting that you could reduce the code you write in that case. Then when you get to all other sorts of class composition it gets pretty hard to understand at first.

I think that's the main reason, it's easier to get started with. Also, CS teaching is nothing like real life development, as you stated, interfaces get used quite a bit more than the idea of concrete, or even abstract base classes but you just might have an abstract base class that implements part of the interface.

Re:Inheritance Is Terrible by ta0967 on Saturday March 19, 2016 @05:43PM (#11320609)
platypus. that is to say: the teaching is still bad.
Re:Inheritance Is Terrible by manyxcxi on Saturday March 19, 2016 @05:55PM (#11320666)
Exactly why I kept going back to- it's easier. By the time they get to platypus they're hopefully in the real world having picked up some of the additional knowledge required to solve it in an elegant fashion.