4 ms·
C#'s (and Java's) lack of multiple inheritance is a virtue, IMO.
by king_magic 14y ago
C#'s (and Java's) lack of multiple inheritance is a virtue, IMO.
- bigdubs 14y agoI generally agree that use of mixins / multiple inheritance leads to architectural missteps.
- nnq 14y ago...aren't they completely different tools? One uses mixins to keep the class hierarchy shallow, with fewer levels of inheritance. OTOH multiple inheritance tends to complicate an overly convoluted class hierarchy most of the time. It's true that in a language like Python people use multiple inheritance to "simulate mixins", but it's to the same good effect of keeping the class hierarchy short and flat, but in C++ at least I've never seen MI used to simplify things, as opposed to mixins that always seem well used...