Jon A. Cruz wrote:
Java had a much better approach with its Interfaces. More modern C++ usage of MI are abstract base classes used in place of Java Interfaces.
OK, now we're getting into religious issues :) I have seen several problems that can be solved cleanly with MI but become very ugly with single inheritance. For example it allows you to implement mixins. The argument against it seems to be similar to operator overloading, e.g. we shouldn't use it because many people don't use it correctly, and sometimes we might stumble upon classes two classes we want to inherit from that define a method with the same name. The first just doesn't convince me because it's like banning knives because somebody might get hurt. The second isn't convincing either because at least in C++ there are trival workarounds. Anyway, this issue is tangential to my original point.
Also... a much better C++ approach is to avoid GObject-based classes overall. That gives better reuse and more functionality.
I didn't mean GObject based classes as in SPObject. I meant that e.g. you can't simultaneously derive from two gtkmm classes like Gtk::Action and Gtk::MenuItem, because GType doesn't support multiple inheritance. However, you can still derive from one gtkmm class and any number of non-gtkmm classes without any problems, because GType only cares about the gtkmm class. It's even used in gtkmm itself.
Regards, Krzysztof Kosiński