[OT] Programming language WATs

Nick Sabalausky a at a.a
Fri Jan 20 19:14:43 PST 2012


"Jonathan M Davis" <jmdavisProg at gmx.com> wrote in message 
news:mailman.640.1327115503.16222.digitalmars-d at puremagic.com...
> On Saturday, January 21, 2012 03:44:53 Andrej Mitrovic wrote:
>> Probably Windows-only:
>>
>> void main()
>> {
>>     string a = "foo";
>>     "foo" = "bar";
>>     writeln(a);  // "foo"
>>     assert(a == "foo");  // failure
>> }
>
> Yeah. I don't understand why string literals aren't treated as fully 
> immutable
> in Windows.

Or as rvalues.

> They are in Linux. It makes no sense to be able to alter string
> literals.
>




More information about the Digitalmars-d mailing list