is(x = module) vs. __traits(isModule, x)

Paul Backus snarwin at gmail.com
Thu Oct 8 19:15:09 UTC 2020


On Thursday, 8 October 2020 at 17:55:21 UTC, Steven Schveighoffer 
wrote:
>
> I did getMember already.

You did getMember for a type, not a variable. getMember for a 
type evaluates to a symbol, but getMember for a variable 
evaluates to an expression.

> I'm not sure that's 100% true for type functions -- they aren't 
> in there yet.

In order to do everything that __traits can do, type functions 
would have to be polymorphic, which is contrary to their design 
goals.


More information about the Digitalmars-d mailing list