Divide & Conquer divides, but doesn't conquer

Stefan Koch uplink.coder at googlemail.com
Mon May 25 21:16:16 UTC 2020


On Monday, 25 May 2020 at 20:47:42 UTC, Adam D. Ruppe wrote:
> On Monday, 25 May 2020 at 17:34:36 UTC, Timon Gehr wrote:
>> (As an experiment, the original implementation also had 
>> `__local` declarations to insert symbols into the local scope 
>> without forwarding.)
>
> That would actually be really useful in some places. Like
>
> static foreach(memberName; __traits(allMembers, f)) {
>      __local alias member = __traits(getMember, f, memberName);
> }
>
> Though of course it is also possible to do such with staticMap 
> in places.

you want type functions :)
What you are doing there works by default since declarations are 
temporary.


More information about the Digitalmars-d mailing list