Can we just have struct inheritence already?

Walter Bright newshound2 at digitalmars.com
Tue Jun 18 09:23:45 UTC 2019


On 6/13/2019 5:03 AM, Timon Gehr wrote:
> I think a lot of the default opposition to new features (especially if they can 
> be implemented with a moderate amount of user code) is about DMD compiler 
> complexity, about adding new things to a code base which already suffers quite a 
> bit from incidental complexity.

D has a TON of features. And yet every single day, people demand ever more 
features. How can this possibly work without turning D (and the compiler) into a 
unusable mess. I have no choice but to constantly say "no".

As for struct inheritance, it seems what Manu really wants isn't struct 
inheritance at all, it is zero sized structs having zero size when they are used 
as fields.

First off, he has a workaround for it. I agree it's not very pretty, but it 
works and he is not blocked. That moves it way down on the priority list.

Secondly, there are template mixins, which have zero size.



More information about the Digitalmars-d mailing list