3 ms·
My Java is rusty (which I'm happy about) but presumably you're still restricted to single inheritance, whereas you can implement multiple interfaces? It's kind
by nly 13y ago
My Java is rusty (which I'm happy about) but presumably you're still restricted to single inheritance, whereas you can implement multiple interfaces?
It's kind of sad how C++s object model is now actually a lot less complex than Javas and still more powerful.
- auvrw 13y ago> whereas you can implement multiple interfaces? right, duh/derp.
- richardwhiuk 13y agoI disagree: - virtual / none virtual functions - virtual / non virtual inheritance - pointers and references - templates I have to say that multiple inheritance normally means you are using the wrong design pattern, and you should be doing composition instead.
- nly 13y agoAll functions in Java are virtual, C++ just lets you make the performance trade-off. Virtual inheritance is only useful in a few cases in complex inheritance hierarchies, and most never need to know it exists. The other 2 aspects of C++ are nothing to do with the object model.