Usability of "allMembers and derivedMembers traits now only return visible symbols"

Martin Nowak via Digitalmars-d digitalmars-d at puremagic.com
Sat Sep 3 07:48:54 PDT 2016


On Wednesday, 31 August 2016 at 05:33:50 UTC, ketmar wrote:
> all this mess should be resolved in compiler by assigning 
> template *two* visibility scopes: one is template's "normal" 
> scope (so it can see symbols from it's originating module), and 
> second is it's "instantiation" scope. after all, this is 
> exactly what programmer is exepecting. current solution is not 
> a solution at all, it's a hacky workaround promoted to 
> "official technique".

This would require a new instance for every template 
instantiation. The instantiation scope does not leak into the 
template by design, it allows us to cache instantiations and 
greatly speed up compilation.


More information about the Digitalmars-d mailing list