VTable/open resusable object model

BLS nanali at nospam-wanadoo.fr
Wed Jul 18 10:38:56 PDT 2007


Robert Fraser schrieb:
 > BLS Wrote:
 >
 >> An Object model that can be customized
 >> to support powerful features such as multiple inheritance and
 >> mixed-mode execution (native code/ byte code).
 >
 > Really working on those complete sentences there?

Yes, A smalltalk derivat is allready implemented based on this object 
model, which is, compared to Cpp, approximate /only/ 20 percent slower.

 >
 > But, sure, it's not a bad idea (though, IMO, multiple inheritance 
_is_). But it seems like it'd be a lot of work at this stage for Walter, 
and I certainly don't think it should become part of the spec.

Instead of multiple inheritance implementing *traits* is also possible :

quote :
Traits are a powerful software composition mechanism. A trait
is a collection of methods without state that can be manipulated and
combined with other traits according to an algebra of composition,
aliasing and exclusion. They are interesting because they provide
the power of multiple inheritance without the drawbacks and complexity
of multi inheritance ....
end quote


Bjoern



More information about the Digitalmars-d mailing list