DIP66 - Multiple alias this

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Sep 30 01:16:36 UTC 2020


On 9/29/20 9:13 PM, Paul Backus wrote:
> On Tuesday, 29 September 2020 at 13:17:50 UTC, 12345swordy wrote:
>>
>> You could take Manu Evans advice and allow structs to inherent from 
>> other structs traditionally like in c++ and deprecate alias this.
>>
>> That would solve 80 percent of the problem.
>>
>> - Alex
> 
> I did a grep for `alias this` in Phobos last time this topic came up. By 
> my count, use of `alias this` was split almost exactly 50/50 between 
> forwarding to a member variable and forwarding to the result of a method.

How frequently did the method return ref vs rvalue?


More information about the Digitalmars-d mailing list