multiple `alias this` suggestion

Daniel N via Digitalmars-d digitalmars-d at puremagic.com
Wed May 3 12:52:46 PDT 2017


On Wednesday, 3 May 2017 at 19:41:58 UTC, Daniel N wrote:
> On Saturday, 29 April 2017 at 23:57:07 UTC, Carl Sturtivant 
> wrote:
>> On Thursday, 27 April 2017 at 05:41:43 UTC, Daniel N wrote:
>>
>> Even better, with alias for embedded aliased-to-this structs 
>> made working usefully, name management can be done before 
>> embedding the features, by having another layer of embedding 
>> as in my earlier example here.
>> https://forum.dlang.org/post/hvdmtvjvccbkmkjzuclm@forum.dlang.org
>>
>
> OK, you have a point.
>
> I realise syntax is the least important part of this proposal, 
> but "alias this" is the only alias that still is backwards...
>
> If you do write a DIP at least consider this:
> alias this : entity, render;

PS One could of course eat the cake and keep it still, at the 
cost of additional complexity.

Distributed and prioritized:
alias this : a_prio1, a_prio2, a_prio3;
alias this : b_prio1, b_prio2;

any a* could clash with any b* but a:s wont clash with their own 
kind since they are internally prioritised the same goes for b:s.





More information about the Digitalmars-d mailing list