ModuleInfo, Object.localClasses(), and Object.find() - any users?
Steven Schveighoffer
schveiguy at gmail.com
Mon Dec 12 20:57:39 UTC 2022
On 12/12/22 3:40 PM, cc wrote:
> This would affect Object.factory, yes? I've used that previously in
> commercial software.
> Can partially work around it with `std.traits.moduleName` and
> `__traits(allMembers, somemodule)`, but what other options are there for
> finding classes outside of the current module other than those
> explicitly referenced in the calling module?
You need to register those classes with a system, to replace the
functionality that `ModuleInfo` and `Object.factory` provide.
But it would be better to do that anyway, since the compiler isn't
completely consistent with which classes it inserts into `ModuleInfo`.
-Steve
More information about the Digitalmars-d
mailing list