default '==' on structs
Steven Schveighoffer
schveiguy at yahoo.com
Thu Feb 3 10:00:47 PST 2011
On Thu, 03 Feb 2011 12:52:28 -0500, spir <denis.spir at 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
More information about the Digitalmars-d-learn
mailing list