Can we just have struct inheritence already?

Danni Coy danni.coy at gmail.com
Tue Jun 11 02:17:28 UTC 2019


On Tue, Jun 11, 2019 at 12:08 PM Danni Coy <danni.coy at gmail.com> wrote:
>
> If the main objection to
>
> struct DerivedStruct : BaseStruct
>  {
>      // derived members
>      //...
>  }
>
> looks too much like polymorphism
>
> would something like
> struct DerivedStruct
> {
>      @contains BaseStruct base;
> }
> with some creative lowering
> be a more acceptable way forward?

or alternatively
struct DerivedStruct : static BaseStruct
{
}


More information about the Digitalmars-d mailing list