[Uml-devel] ambiguity

P. Fleury fleury at users.sourceforge.net
Wed Jan 15 22:05:03 UTC 2003


Andrew Sutton wrote:

>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. 
>
Just a note: the traversal of inheritance chains is a compile-time 
issue. Runtime, it is the same overhead for a virtual function going 
down 1 level of inheritance or 100, as it will be a function pointer 
table lookup.

>what do you think? interfaces and a few implementations or virtual 
>inheritance?
>  
>
I'm very biased, but I'd go the Java way: interfaces and a few 
implementations. It makes the functionality of a class clearer, and 
avoids all the pitfalls.






More information about the umbrello-devel mailing list