On Wed, 17 Jun 2015 09:49:56 +0900, Mike Parker wrote: > On 6/17/2015 6:17 AM, tcak wrote: >> As far as I known, when I define a string with enum and it is used at >> different parts of code, that string is repeated again and again in >> executable file instead of passing a pointer to string. So, using enum >> with string doesn't seem like a good idea. >> > The string is not repeated again and again in the *executable*. The > compiler is smart enough to recognize the same string is used in > multiple places. It will be placed in the data segment only once. It's > no different than using a string literal.
but only to some extent[1]. [1] https://issues.dlang.org/show_bug.cgi?id=14459
signature.asc
Description: PGP signature
