aliases and .stringof

Andrej Mitrovic andrej.mitrovich at gmail.com
Tue Apr 15 04:31:43 PDT 2014


On 4/15/14, Dicebot <public at dicebot.lv> wrote:
> In general .stringof output is not defined by spec and is not
> guaranteed to stay same between releases.

The spec mentions this as well:
http://dlang.org/property.html#stringof

Quote:

-----
Note: Using .stringof for code generation is not recommended, as the
internal representation of a type or expression can change between
different compiler versions.

Instead you should prefer to use the identifier trait, or one of the
Phobos helper functions such as fullyQualifiedName.
-----


More information about the Digitalmars-d-learn mailing list