Objective-D, reflective programming, dynamic typing

Christopher Wright dhasenan at gmail.com
Sun Apr 5 08:48:15 PDT 2009


Andrei Alexandrescu wrote:
> Christopher Wright wrote:
>> What information did you find that you needed but is not available in 
>> TypeInfo?
> 
> To have constant-type dispatching without limitations you need the 
> static type information.

What do you mean by this? At first I thought you meant that TypeInfo 
does not contain sufficient information to determine whether something 
is const or immutable, but that is not the case. If you wish to convert 
a Variant of a mutable thing to a const version of it, then you can 
check whether the type you get is convertible, and without any trouble 
-- the template instantiation to get the appropriate type will provide 
the TypeInfo you need.

So what's the issue?



More information about the Digitalmars-d mailing list