Thank you!

Tejas notrealemail at gmail.com
Tue Sep 7 13:36:39 UTC 2021


On Tuesday, 7 September 2021 at 08:46:48 UTC, Basile B. wrote:
> On Tuesday, 7 September 2021 at 05:01:30 UTC, Tejas wrote:
>> On Tuesday, 7 September 2021 at 01:34:01 UTC, Basile B. wrote:
>>> [...]
>>
>> Don't you think it would be better to raise a warning though 
>> instead of silently fixing it?
>
> no. as compiler experiment people can add a flag to generated 
> temproaries and then printf on a visitor for VarExp and then 
> will probabably be surprised by the amount of message printf'd 
> like 2567 times
>
> "look boy am saving expressivity for ya here"
>
>>
>> It would help people understand the differences between [...]



```d
import std.stdio;

struct S { int i; }

S _s;

S s (){return _s;}

void main()
{
     s().i = 42;
     writeln(_s.i == 42);
}

Output:
false
```

Wow, compiler help much appreciated


More information about the Digitalmars-d mailing list