DIP 45 - approval discussion
Dicebot
public at dicebot.lv
Tue Nov 12 16:29:08 PST 2013
On Wednesday, 13 November 2013 at 00:25:36 UTC, Andrei
Alexandrescu wrote:
> I don't think all classes in a system are discoverable during
> compilation. This is the part of Object.factory that is not
> easy to replace. There must be a global map somewhere and a
> per-module registration during initialization.
>
> Andrei
Sure, this topic was already discussed in __traits(getUnittest)
context recently, similar problem. You can find all classes that
transitively accessible from context via imports - this is a
natural limitation of compile-time reflection. Sometimes it is
enough, sometimes registration is necessary. But it is a nice
tool to have.
More information about the Digitalmars-d
mailing list