Ask HN: Inheritance?

https://news.ycombinator.com/item?id=641924
by BigZaphod • 17 years ago
3 5 17 years ago

Inheritance is just an implicit form of delegation that comes with a bunch of default behaviors that can totally screw you.

Of course I use it constantly and spend a ton of time "designing" everything "properly" to have a sweet class hierarchy with all kinds of unnecessary power and flexibility to solve the problem at hand.

Does anyone else find themselves sucked into that trap? It seems like when using straight C, I can still think and program in an OO style, but I don't so readily waste as much effort trying to come up with a "perfect" tree of objects. Is this simply an issue of discipline or is there a drug-like effect when using inheritance?

Related Stories

Loading related stories...

Source preview

news.ycombinator.com