The pull request of the day: 3998
monarch_dodra via Digitalmars-d
digitalmars-d at puremagic.com
Tue Oct 7 12:35:54 PDT 2014
On Tuesday, 7 October 2014 at 17:58:41 UTC, Dicebot wrote:
> On Tuesday, 7 October 2014 at 17:36:24 UTC, Jonathan wrote:
>> What are some "common uses" for multiple aliasing? I
>> understand the feature, but curious where it would be commonly
>> employed.
>>
>> To me, this allows structs to have something like inheritance.
>> You add a property for another struct that acts like an
>> interface and alias that struct to the current one. Thoughts?
>
> Multiple inheritance of implementation for structs + implicit
> casting in one basket
I wish that's what we used it for. More often than not, it's used
to simulate implicit casting, sometimes with catastrophic results
in generic code...
More information about the Digitalmars-d
mailing list