Hacker News new | ask | show | jobs
by bluejekyll 3799 days ago
Don't forget about how awesome C++'s multiple inheritance is! <sarcasm/>

edit: It's worth the down votes on this. Multiple inheritance is pure evil and confusion. In fact, even in Java I now rely on aggregation over inheritance.

http://stackoverflow.com/questions/269496/inheritance-vs-agg...

2 comments

Unfortunately, in some languages, inheritance of abstract classes is the only way to get the equivalent of interfaces.

That said, yeah, the less class inheritance, the better. Ideally, work in a language where interfaces can include default implementations.

Totally, no problem with default implementations as long as they are generic. Java finally supports this, as well as Rust and others.
c++ is a great language but a lot of the inheritance system is regrettable at best.