Is `alias this` a mistake?

Alexandru Ermicioi alexandru.ermicioi at gmail.com
Tue Aug 3 20:19:56 UTC 2021


On Tuesday, 3 August 2021 at 17:18:48 UTC, bachmeier 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
>
> The only argument I've heard against alias this is that it can 
> be misused. That's kind of a joke argument in a language that 
> has pointers.

Fyi, 'alias this' nicely fits for doing auto unboxing of a 
wrapper type into wrapped type, similar to how java does unboxing 
of primitives, not sure that it will be possible with mixin 
templates.


More information about the Digitalmars-d mailing list