Multiple alias this, what's the hold up?
Ali Çehreli
acehreli at yahoo.com
Tue Jun 18 22:08:49 UTC 2019
On 06/15/2019 11:08 PM, Walter Bright wrote:
> On 6/15/2019 6:21 PM, Timon Gehr wrote:
>> In terms of lookup, the issues with multiple alias this are the same
>> as the issues with multiple import declarations. Implicit conversions
>> could use the same lookup rules, but there would need to be a way to
>> disambiguate. The code in the compiler that implements import
>> declarations is unlikely to be easily reusable.
>
> Multiple alias this is multiple inheritance. Generally, if you find
> yourself wanting multiple inheritance, it's likely time to rethink the
> data structures.
Does this mean multiple alias this will never happen?
I would love to remove a section in my book that was added in the hopes
of seeing this feature "any day now". :)
I like the example I came up with though: A TeachingAssistant class that
can appear in a Student context as well as in a Teacher context.
Ali
More information about the Digitalmars-d
mailing list