I’m reproducing a picture that Jean posted in google plus to exemplify multiple inheritance.

Diagram showing wheelbarrow and bench as parents of a red bench-wheelbarrow hybrid

I don’t like the mechanism of multiple inheritance (at the conceptual level is sometimes useful but too easy to get it wrong and at the implementation level is just a nightmare since most technologies do not support it so you are forced to find a workaround for it), this examples shows that sometimes is a very elegant solution to express the relationship between a set of concepts. What about you? Do you use multiple inheritance in your models? If so, how do you then deal with it during code-generation?

UPDATE: Via Jean, another great graphical example of multiple inheritance (Jean says that “the drawing below is composed from a Venn Diagram of Twitter@@LeBlancRose_”).

Diagram showing turtle playing guitar and duck playing keyboard combining to create platypus playing keyboard

Want to build better software faster?

Want to build better software faster?

Get the latest news in software modeling, model-based and low-code development

Thanks for your interest. Check your inbox and confirm your subscription!

Pin It on Pinterest

Share This