Is this statement in http://dlang.org/dmd-windows.html still true?
Jesse Phillips
jessekphillips+D at gmail.com
Mon Jun 25 20:02:42 PDT 2012
On Tuesday, 26 June 2012 at 00:56:48 UTC, Pierre Rouleau wrote:
> "String literals are read-only under Linux. Attempting to write
> to them will cause a segment violation."
You have read this completely wrong.
It is still true today.
Linux places string literals in Read-Only Memory, Windows does
not. This is OS specific behavior and does not relate to the
language in the least.
The example is given to show why language support for
immutability is important. It allows the language to define what
is legal for the stored data.
More information about the Digitalmars-d
mailing list