multiple `alias this` suggestion
Carl Sturtivant via Digitalmars-d
digitalmars-d at puremagic.com
Thu Apr 27 21:44:44 PDT 2017
On Thursday, 27 April 2017 at 05:41:43 UTC, Daniel N wrote:
> On Wednesday, 26 April 2017 at 18:34:48 UTC, Carl Sturtivant
> wrote:
>> On Wednesday, 26 April 2017 at 15:00:30 UTC, Steven
>> Schveighoffer wrote:
>>> I think you can appreciate that this doesn't scale. Imagine a
>>> case which has 2 or 3 optional alias this items.
>>>
>>> -Steve
>>
>> Agreed, not manually, as it is exponential in the number of
>> conditions.
>
> Image using frameworks which conveniently allow adding features
> to a struct...
>
> struct Beholder
> {
> mixin Entity!Movable;
> mixin Render!"Beholder.png";
> }
>
> ... then you couldn't even solve it manually without rewriting
> the framework.
>
> With distributed 'alias this' you could seamlessly combine any
> number of frameworks from different vendors.
Please explain "seamlessly" with the prospect of name collisions.
More information about the Digitalmars-d
mailing list