__typeid
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sun Aug 9 13:20:03 UTC 2020
On 8/2/20 11:34 AM, Timon Gehr wrote:
> On 01.08.20 18:12, Andrei Alexandrescu wrote:
>>
>> Reading a bit more about TypeInfo and related stuff, I figure (and
>> correct me if I'm wrong) that the entire machinery is currently used
>> for the following purposes (only):
>>
>> * Built-in associative arrays (which ought to be phased out)
>>
>> * Inform the GC of what it needs to scan (provided in an awkward
>> manner though, this is subject to a later discussion)
>>
>> * Dynamic cast information for class objects
>>
>> * Object creation for Object.factory() (which also should be phased out)
>
> There's also its toString. I have on occasion used
> writeln(typeid(classInstance));
Noted, thanks.
More information about the Digitalmars-d
mailing list