assignment: left-to-right or right-to-left evaluation?
SeeWebsiteForEmail at erdani.org
Mon May 11 06:27:35 PDT 2009
Georg Wrede wrote:
> Andrei Alexandrescu wrote:
>> uint fun();
>> int gun();
>> int a = new int;
>> a[fun] = gun;
>> Which should be evaluated first, fun() or gun()?
> arra[i] = arrb[i++];
> arra[i++] = arrb[i];
> I'm not sure that such dependences are good code.
> By stating a definite order between lvalue and rvalue, you would
> actually encourage this kind of code.
By not stating it, I introduce a gratuitous nonportability.
More information about the Digitalmars-d