[Uml-devel] ambiguity

Andrew Sutton ansutton at kent.edu
Wed Jan 15 18:37:04 UTC 2003


i've written well over that, and i've NEVER used it :) as a general principal 
i avoid multiple inheritance like the plague.

> In my experience, I have used it only a single time, over the roughly
> 100'000 lines of C++ code I have written so far. And I did not miss it
> in Java at all.
>
> But does UML specify a way to indicate if the multiply inherited base
> class is unified or not ? Will it in future ?

not that i'm aware of. looking at the MOF and JMI specifications its really 
obvious that they want those to be interfaces (pure virtual classes). that 
would definitely solve the problem. we could define all those classes as pure 
virtual and implemented by a relatively small number of classes. i'm not sure 
which way i want to go with it.

i have a sneaking suspicion that implementing everything in the base classes 
would be a) a little less confusing and b) more efficient - no traversal of 
inheritance chains for virtual functions. whatever solution we pick for MOF 
classes will hold for UML as well (and CWM and SPEM and other MOF defined 
metamodels).

what do you think? interfaces and a few implementations or virtual 
inheritance?

andy




More information about the umbrello-devel mailing list