Can we just have struct inheritence already?

Manu turkeyman at gmail.com
Sun Jun 9 22:03:02 UTC 2019


On Sun, Jun 9, 2019 at 2:40 PM Ola Fosheim Grøstad via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
>
> On Sunday, 9 June 2019 at 21:13:50 UTC, Manu wrote:
> > This is NOT polymorphism, we're not talking about polymorphism,
> > I wish people would not change the topic.
>
> Well, it sort of is. Consider a situation where you have
> assignment defined for the super class, and where there is a
> field in the subclass that depends on a field in super.

I can form a misuse fail for practically any language feature.
It's possible we identify some common-sense restrictions here to
inhibit the worst of them, but the current restriction is
anti-productive, the line in the sand is drawn incorrectly.

For contrast, I've been arguing on bug reports recently that people
think interactions with uninitialised unions (or =void initialised
code) is @safe... 🤯🤯🤯
which just shows how astonishingly arbitrary this shit is.



More information about the Digitalmars-d mailing list