Why can't we derive struct's?

12345swordy alexanderheistermann at gmail.com
Thu Dec 20 15:44:34 UTC 2018


On Thursday, 20 December 2018 at 15:29:50 UTC, H. S. Teoh wrote:
> 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??
>
>
> T

When IgorStepanov quit disappearing on us.
https://github.com/dlang/dmd/pull/8378

Alex


More information about the Digitalmars-d mailing list