DLL symbol identity

Benjamin Thaut via Digitalmars-d digitalmars-d at puremagic.com
Fri May 8 07:37:31 PDT 2015


Am 08.05.2015 um 13:34 schrieb Kagamin:
> bool checkIfSomeClass(Object o)
> {
>    return typeid(o) is typeid(SomeClass);
> }
>
> Doesn't typeid(o) extract TypeInfo from the object? If it's stored as a
> physical value in the object, how can it change transparently for const
> class?
>
> As I understand, C++ resorts to preinstantiation of needed templates
> when compiling to dlls.

This is obviously a very simplified example. You either have to take my 
word for it about the actualy issue and voice your opinion on the 
decision to make or dig into dmds sources, understand how type infos 
work and then question my issue description. But please don't question 
my description of the issue without actually understanding what the 
implementation looks like.

Let me put my question in a different way:

 From the point of a D user, would you rather have 'is' expressions and 
'static' / '__gshared' variables inside classes do strange things 
sometimes when using dlls or would you wan't it to always work without 
considering the underlying implementation. Please choose option 1 or 
option 2.


More information about the Digitalmars-d mailing list