immutable string

Michael pr at m1xa.com
Sun Apr 28 00:38:23 PDT 2013


>> Why?
>
> Because maybe string is already (immutable)char[]?

Immutable var itself is runtime constant (as mentioned here - 
docs are outdated), enum var is manifest constant (can be 
copypasted at compile time).
Now right way is 'enum string' ... or 'str.to!string()' that can 
be evaluated at compile time.


P.S.: Found this in previous similar topic.



More information about the Digitalmars-d-learn mailing list