Can we just have struct inheritence already?

John Colvin john.loughran.colvin at gmail.com
Tue Jun 25 07:57:51 UTC 2019


On Wednesday, 19 June 2019 at 01:10:56 UTC, Manu wrote:
> On Wed, Jun 19, 2019 at 10:45 AM Walter Bright via 
> Digitalmars-d <digitalmars-d at puremagic.com> wrote:
>>
>> On 6/18/2019 5:01 PM, Timon Gehr wrote:
>> > This works if Base and Derived are defined in the same 
>> > module. Otherwise this does not do the correct thing, 
>> > because mixin templates are analyzed in the scope into which 
>> > they are mixed.
>>
>> That is correct, but with some care you can make it work, even 
>> if the mixin template functions just forward to other 
>> functions which are evaluated in the BaseMembers' scope.
>
> I already have workarounds. That's not what this thread is 
> about.

Not just my opinion, but what I perceive to be expected procedure 
here:
    The merits of any new feature have to be argued in terms of 
net benefit over existing solutions.

Just my opinion:
     The best feature design often comes from struggling with 
current features.

You obviously have done a lot of the second, but it seems that 
you think "it's obviously better, the current solutions are just 
ugly hacks, everyone will laugh at us" is going to convince 
people enough w.r.t. the former.

Obvious hyperbole is obvious, but hopefully you get my point?


More information about the Digitalmars-d mailing list