DIP66 - Multiple alias this
IGotD-
nise at nise.com
Tue Sep 29 18:37:59 UTC 2020
On Tuesday, 29 September 2020 at 09:21:42 UTC, IGotD- wrote:
> On Monday, 28 September 2020 at 18:44:51 UTC, H. S. Teoh wrote:
>>
>> `alias this` is one of the things that seemed like a good idea
>> at the time, but is turning out to be something that leads to
>> code smells. If anything, we'd like to get rid of it rather
>> than extend it!
>>
>>
>> T
>
> As it seems, the language maintainers want to remove alias this
> totally. If that's the case shouldn't the documentation be
> updated telling the programmers that if they write new code
> they should avoid alias this, and then also direct them to
> alternative solutions.
Further more, this in the "alias this" documentation.
"Multiple AliasThis are allowed. For implicit conversions and
forwarded lookups, all AliasThis declarations are attempted; if
more than one AliasThis is eligible, the ambiguity is disallowed
by raising an error. Note: Multiple AliasThis is currently
unimplemented."
which is totally out of date, needs to be removed.
Further more, there seems to be some magic going on with mixin
templates when it comes to constructors and deconstructors. This
is not documented.
More information about the Digitalmars-d
mailing list