Evaluation order of "+="

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Tue Jul 12 10:20:10 PDT 2016


On 7/12/16 5:15 AM, Johan Engelen wrote:
> On Tuesday, 12 July 2016 at 07:57:37 UTC, Johan Engelen wrote:
>> On Tuesday, 12 July 2016 at 02:27:04 UTC, deadalnix wrote:
>>>
>>> There was a very lenghty discussion about this in the past. DMD is
>>> correct on that one. The semantic is such as :
>>>
>>> int plusEqual(ref int a, int b) {
>>>   a = a + b;
>>>   return a;
>>> }
>>
>> Thanks.
>> Could this be added to the spec please?
>
> https://github.com/dlang/dlang.org/pull/1429

Great, thanks. I added a comment to that, which in turn caused a bug 
report. What does the community think? -- Andrei


More information about the Digitalmars-d mailing list