core.reflect vs c++ reflection
Alexandru Ermicioi
alexandru.ermicioi at gmail.com
Tue Sep 28 12:36:08 UTC 2021
On Tuesday, 28 September 2021 at 12:32:04 UTC, Per Nordlöw wrote:
> On Tuesday, 28 September 2021 at 11:45:37 UTC, Adam D Ruppe
> wrote:
>> It is called
>>
>> __traits(identifier)
>>
>> .stringof should never be used outside of debugging messages.
>
> Why is `.stringof` worse than `__traits(identifier)`?
Because traits identifier is well defined to return only the id
of the subject, while stringof can return more than id. It can
for example return the expression as a string.
More information about the Digitalmars-d
mailing list