multiple `alias this` suggestion

Carl Sturtivant via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 20 13:35:04 PDT 2017


On Wednesday, 19 April 2017 at 18:32:43 UTC, Carl Sturtivant 
wrote:
> Imagine the existing single `alias this` is extended to provide 
> such a heierarchy of lookups. For example,
>
> struct top
> {
>     mem3 m3;
>     mem2 m2;
>     mem1 m1;
>     alias m3, m2, m1 this;
>     // ...
> }
>
> could be interpreted to mean search for a name in m3 if not 
> found in top, and in m2 if not found in m3 and in m1 if not 
> found in m2. I don't back the syntax, just the notion.
>
> Maybe that's not all that's expected from "multiple alias this" 
> but it would be a clean step forward. Issues?

No issues then!
Time for a D I P perhaps.
Comment?



More information about the Digitalmars-d mailing list