Factory pattern for classes

lexxn aleksandar.m.nikolov at gmail.com
Sun Aug 9 14:58:43 UTC 2020


On Sunday, 9 August 2020 at 12:24:05 UTC, Steven Schveighoffer 
wrote:
>
> If you know what your class is going to be, I'd just import the 
> file that contains it and avoid the whole Object.factory deal. 
> It's going to go away anyways.

Not sure if it's a good idea in my case. I'm going to be using 
all of the classes eventually in my loop, but I just need to 
initialize them in a conditional way depending on the use case.


More information about the Digitalmars-d-learn mailing list