Is `alias this` a mistake?

Tejas notrealemail at gmail.com
Tue Aug 3 16:40:31 UTC 2021


On Tuesday, 3 August 2021 at 16:34:35 UTC, IGotD- wrote:
> On Tuesday, 3 August 2021 at 15:52:07 UTC, NonNull wrote:
>> Here, further down, I just saw Walter indicate his opinion 
>> that `alias this` is a mistake. Any thoughts?
>>
>> https://news.ycombinator.com/item?id=28029184
>
> Usually inheritance can be replaced with composition and alias 
> this has been the way to do that. Instad of alias this, Walter 
> wants us to use mixin templates for composition. I have no 
> problems with this but the documentation and marketing has 
> totally failed regarding this few seem to know about mixin 
> templates its usage and limitations. The D community needs to 
> be market mixin templates better.

This is the first time I'm hearing about this application of 
mixin templates.
I've seen Adam also say that MTs are underrated but I just don't 
understand how you can say that they replace inheritance.

Think its possible for someone to write an article on the D blog? 
I'm interested in seeing this.


More information about the Digitalmars-d mailing list