Welcome! Log In Create A New Profile

Advanced

Drop Multiple Inheritance.

Posted by BLS 
BLS
Drop Multiple Inheritance.
October 03, 2008 07:28PM
There exist a bunch of reasons to drop multiple inheritance (MI) but I think these two are enough.

Speed.
Even if you do not use MI. The Virtual function/method Table (vTable) management is nessesarily more time and memory consuming than a Single Inheritance vTable.

Instead I would like to see inner/adaptor classes. (similar Java/C#) In other words nested classes.

DOT NET compatibility.
The DOT NET Common Language Runtime (CLR) has no support for MI. I guess this is one of the reasons why are not able to instantiate from a NET class. For Instance: Use a NET Form control.

Creating a DOT NET assembly requires anyway that you limit your WD classes to single inheritance.

Bjoern Lietz-Spendig






Edited 2 time(s). Last edit at 10/03/2008 07:32PM by BLS.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: