struct mixins

Bill Baxter wbaxter at gmail.com
Tue Nov 17 12:44:42 PST 2009


On Tue, Nov 17, 2009 at 11:02 AM, div0 <div0 at users.sourceforge.net> wrote:

>> I guess mixin struct could allow a kind of static multiple
>> inheritance.  But if that's desirable, then probably alias this should
>> just be extended to enable that.  Seems like the two are so similar
>> that whatever alias this lacks in features could just be added rather
>> than introducing a new construct.
>>
>> --bb
>
> Well at the moment you only get one alias this. I suppose you could
> allow multiple alias this, but then what happens with multiple symbols
> with the same name? At least with mixins you can disambiguate.

I don't see why you couldn't allow alias this to give you the same
disambiguation capability.
Or just get rid of alias this in favor of type mixins.
Doesn't really matter to me.  But I'm not seeing any reason to have
both constructs when they do almost the same thing.

--bb



More information about the Digitalmars-d mailing list