Dynamic creation of instannce
    Deewiant 
    deewiant.doesnotlike.spam at gmail.com
       
    Mon Apr 24 09:17:28 PDT 2006
    
    
  
maa at lagraine.com wrote:
> hello
> 
> I kust we,nt thru a lot of D documentation
> D solve apparently to me a lot of what I hate In C.
> But I still have a big question
> can you in D write
> 
> new toto;
> 
> were toto is not a class name but a variable holding a class name
> or do I have to go thru factories as usual
> (except that it would be more simplle in D)
> 
> Thanks
> Maa
> 
> 
If you're looking for runtime reflection, like in Java where you can do
something like 'Class c = new Class("Foo")', which would be equivalent to 'Class
c = new Foo()', then, no. D doesn't have a reflection API - at least not yet.
    
    
More information about the Digitalmars-d-learn
mailing list