On Tuesday, 4 June 2013 at 07:33:04 UTC, Dicebot wrote:
On Tuesday, 4 June 2013 at 05:41:16 UTC, Rob T wrote:
Structs would IMO be far more useful if they had inheritance.
Inheritence can be fully removed from the rest of
polymorphism, so there's no reason why structs which are not
polymorphic cannot inherit.
If no polymorphism is needed, there is no reason to use
inheritance instead of template mixins.
mixins make me shudder, however, if you can point out an example
of this working for simulating struct inheritance, I'd be
interested to have a look. Of course I strongly suspect that it
will suffer from the same problems as the other suggested
methods, not obvious and difficult to implement and maintain.
--rt