Multiple Inhertiance?

Patrick Jeeves via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 5 16:39:11 PST 2014


So what's bothering me is that I can do this:

class NullType {}
class Monkey(T) : T {}
class Zombie(T) : Monkey!T {}
class Robot(T)  : Monkey!T {}
class Pirate(T) : Monkey!T {}
class Ninja(T)  : Monkey!T {}

class MultipleInheritance : 
Zombie!(Robot!(Pirate!(Ninja!NullType))) {};

To get mutliple inheritance.  I just don't understand what the 
purpose of not allowing multiple inheritance is if I can get 
around it this easily, and its far less managable than it would 
be if it had language support.


More information about the Digitalmars-d mailing list