How do I create classes dynamically?

Jack jckj33 at gmail.com
Thu Apr 15 22:06:23 UTC 2021


On Thursday, 15 April 2021 at 17:48:02 UTC, Imperatorn wrote:
> On Thursday, 15 April 2021 at 16:39:30 UTC, Kagamin wrote:
>> On Wednesday, 14 April 2021 at 20:38:16 UTC, Mario wrote:
>>> [...]
>>
>> String mixins is D replacement of macros for code generation.
>> Works like this:
>> ```d
>> mixin("class MyDynamicClassName { }");
>> MyDynamicClassName cls = new MyDynamicClassName;
>> ```
>
> Yes but not at runtime

Could you give an example of what you're trying to archive?


More information about the Digitalmars-d-learn mailing list