Crazy code by Adam on SO

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Fri Aug 29 10:12:06 PDT 2014


On Fri, Aug 29, 2014 at 09:48:51AM -0700, Andrei Alexandrescu via Digitalmars-d wrote:
> Worth a look:
> 
> http://stackoverflow.com/questions/25555329/d-finding-all-functions-with-certain-attribute
[...]

Wow. That's ... awesome. Kudos to Adam for the ingenuity!!! Compile-time
reflection FTW!

The mixin("import "...) line was mind-blowingly ingenious, I have to
say. As are the mixin(x) lines where x is an alias, to coax the compiler
to recursively scan submodules. D seriously rawkz for compile-time
reflection.


T

-- 
Almost all proofs have bugs, but almost all theorems are true. -- Paul Pedersen


More information about the Digitalmars-d mailing list