On Thu, 03 Feb 2011 12:52:28 -0500, spir <denis.s...@gmail.com> wrote:
Side-questions: is it written somewhere dmd interns string literals? If
yes, where? Is this supposed to be part of D's spec or an implementation
aspect of dmd?
String literals are immutable, which means the compiler is free to re-use
them wherever it wants without repercussions (you can't change immutable
data).
It's not documented, but it fits within the requirements.
One thing that *is* documented is that string literals always have an
implicit 0 character appended to the end of them, to allow easy
interaction with C.
-Steve