Subclass Type

Mason Green mason.green at gmail.com
Sun Aug 17 09:02:59 PDT 2008


Jarrett Billingsley Wrote:

> You can't, at least not easily.  It's easy in ActionScript because it's a 
> dynamic, introspective language.  D is statically-typed, and since you can't 
> know what subclass something is until runtime, you can't know what static 
> type to use for it.  

Ah, excellent explanation. Thanks!

> But in general, runtime type identification is not going to get you very far 
> in D.  This doesn't mean you can't solve your problems, it just means you'll 
> have to solve them a different way. 
> 

I know how to get around solving the problem, I was just hoping that there was a "quick and easy" way.  In any case, I appreciate your explanation and suggestion.

Thanks,
Mason



More information about the Digitalmars-d-learn mailing list