Reflection

Bruno Medeiros daiphoenixNO at SPAMlycos.com
Thu Mar 2 11:48:50 PST 2006


Bruno Medeiros wrote:
> 
> Ok, this shows the usefulness of such feature, however there are some 
> problems/limitations. It only works with primitive types (there is no 
> isClass method of TypeInfo). For this feature to reach the full 
> potential, then the TypeInfo class would have to be extended with info 
> about the type's type, (i.e., the metatype, like struct, class, 
> function, primitive, etc.), so that one could use reflection with 
> non-primitive types, especially classes and arrays.
> 
Strike that, we already have it. Upon further investigation I came to 
object.d where there are children classes of TypeInfo for each of the 
metatypes. Nice! :D


-- 
Bruno Medeiros - CS/E student
"Certain aspects of D are a pathway to many abilities some consider to 
be... unnatural."



More information about the Digitalmars-d mailing list