[D1] type of type

%u e at ee.com
Thu Dec 23 15:07:32 PST 2010


== Quote from Denis Koroskin (2korden at gmail.com)'s article
> On Fri, 24 Dec 2010 01:28:49 +0300, %u <e at ee.com> wrote:
> > Should have been this:
> >
> > void func(type t){
> >   new t();
> > }
> >
> >
> Try this (not tested):
> class Test {}
> Object o = Object.factory("Test");

Thanks,
Hiding in Object.. interesting :)
Making the type a string, does this make using small class names more efficient?



More information about the Digitalmars-d-learn mailing list