On Fri, Aug 29, 2014 at 7:12 PM, H. S. Teoh via Digitalmars-d
<digitalmars-d@puremagic.com> wrote:
> The mixin("import "...) line was mind-blowingly ingenious, I have to
> say.

I remember using the same 'module' trick a few years ago (that is,
getting a name with __traits and testing whether it begins with
"module " or not) and, like Adam, being a bit ashamed by what I just
did :) While reading his book this summe, I was, like, "Oh, then this
is what we all do".

Ideally, there should be a __traits(getModules) or
__traits(getImports, ...). I know, I know, "where is the PR?".

Also, this helper!(__traits) just to avoid a hole in the alias syntax
is... what we all do here I suppose, but honestly the parser should
accept

alias member = __traits(getMember, ID, memberName);

as valid D code.

Reply via email to