[OT] Programming language WATs

Timon Gehr timon.gehr at gmx.ch
Fri Jan 20 19:27:09 PST 2012


On 01/21/2012 04:17 AM, Jonathan M Davis wrote:
> On Friday, January 20, 2012 22:14:43 Nick Sabalausky wrote:
>> "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.
>
> Yeah. String literals should definitely be immutable rvalues, and they should
> be that way _regardless_ of the OS or architecture.
>
> - Jonathan M Davis

Tail immutable rvalue is fine. It would be annoying if they were immutable.


More information about the Digitalmars-d mailing list