Why can't we derive struct's?

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Dec 20 15:29:50 UTC 2018

On Thu, Dec 20, 2018 at 12:15:53AM -0800, Manu via Digitalmars-d wrote:
> On Wed, Dec 19, 2018 at 7:45 PM Walter Bright via Digitalmars-d
> <digitalmars-d at puremagic.com> wrote:
> > > Why should it be impossible to derive a struct?
> >
> > Because polymorphism makes little sense for a value type.
> It's not really polymorphism without a vtable, just simple extension.
> `alias this` produces the same result, it's just more wordy, kinda
> ugly, and boilerplate-ey. It also hogs the `alias this` slot.

Sigh... when is multiple alias this ever going to happen??


Being forced to write comments actually improves code, because it is easier to fix a crock than to explain it. -- G. Steele 

More information about the Digitalmars-d mailing list