DIP66 - Multiple alias this

Simen Kjærås simen.kjaras at gmail.com
Wed Sep 30 08:22:01 UTC 2020


On Wednesday, 30 September 2020 at 07:54:39 UTC, Paolo Invernizzi 
wrote:
> On Wednesday, 30 September 2020 at 01:36:59 UTC, Mike wrote:
>> On Monday, 28 September 2020 at 19:55:10 UTC, Andrei 
>> Alexandrescu wrote:
>>
>> 1.  Deprecate `alias this` for classes, and implement multiple 
>> `alias this` for structs.  That will give users the 
>> composition feature they need, and in addition, because 
>> structs cannot inherit, it removes the complexity Walter spoke 
>> of.
>
> This!
>
> We've never used alias this for classes, I'm wondering if 
> there's something like that in Phobos, or in other projects ...

There's quite a few tests in Phobos for alias this on classes, 
but I wasn't able to find a single feature that uses this (and 
frankly, I'd be surprised if I did).

--
   Simen


More information about the Digitalmars-d mailing list