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.