On Sun, 07 Dec 2014 01:12:52 +0000 bitwise via Digitalmars-d <[email protected]> wrote:
> If the reflection mixin is in the same module that it's > reflecting, it can be easily found, but in the case of a static > library where reflection information has to be created in a > separate module, other modules won't be able to locate the > reflection. why don't create a dummy module which only keeps list of all known objects, and create `shared static this ()` constructors which will just register everything in that module? in compile-time other modules can inspect things with traits, and in run-time you'll have one central place with all known metadata, and with autoregistration. and it's doesn't matter where you call your metadata generation mixin, all data will end registered in one place.
signature.asc
Description: PGP signature
