Tagged Questions
2
votes
1answer
144 views
Code re-use in C++, via multiple inheritance or composition? Or…?
I originally asked this question on StackOverflow, but I was directed here, and I think my problem is perhaps as much conceptual as technical, so here goes.
If you’re defining a hierarchy of abstract ...
49
votes
9answers
3k views
Is there any “real” reason multiple inheritance is hated? [closed]
I've always liked the idea of having multiple inheritance supported in a language. Most often though it's intentionally forgone, and the supposed "replacement" is interfaces. Interfaces simply do ...
27
votes
1answer
5k views
Multiple Interfaces in Java - Good or bad [closed]
I'm coming out of an interview just now and the interviewer asked me if a Java interface can "extend" more than one interfaces. I was thinking multiple inheritance is disallowed in java so got that ...
2
votes
1answer
2k views
Adding base-class (inherited) functionality to classes that you don't control
I have a set of classes from a 3rd party library. These classes use an inheritance structure to share logic. I would like to add a layer of abstraction in the middle of their inheritance tree to add ...
2
votes
1answer
2k views
Rails - to use STI or not…that is the question
Six months ago, I asked a question about modeling data for my app, and received some advice pointing me towards STI (see Rails data model - best practices question for the details).
I played around ...