Like getClass()
bearophile
bearophileHUGS at lycos.com
Sat Sep 27 10:20:57 PDT 2008
Sergey Gromov:
> typeof() gives a static type of an object. But I was sure that
> thing.classinfo.name should have referred to the dynamic type name.
> Apparently it's not the case, it prints the same test.FooBar as in your
> test.
Thank you for your answer.
So the question here is: is the information I need present at runtime somewhere?
If the answer is true, then the problem is how to get it.
I think this page of the docs may be improved with few graphical drawings of the data structures it talks about (with lines that show where the pointers point to at runtime in a simple example); such images can probably give all or most of the answers I was looking for:
http://www.digitalmars.com/d/1.0/phobos/object.html
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list