On 09/24/2012 04:27 AM, Timon Gehr wrote:
On 09/24/2012 03:41 AM, Jonathan M Davis wrote:
On Monday, September 24, 2012 03:31:08 deadalnix wrote:
Le 24/09/2012 03:14, Andrei Alexandrescu a écrit :
On 9/23/12 7:20 PM, Adam D. Ruppe wrote:
On Sunday, 23 September 2012 at 22:55:33 UTC, Timon Gehr wrote:
I believe it is currently left-to-right for D, in all kinds of
expressions, but DMD does not implement it yet.
Yeah, I thought it was already defined.
Actually it's right to left for assignments. In expr1 = expr2, expr2
gets evaluated first.
Andrei
Is it by implementation or by design ?
Design. It makes no sense for the left-hand side of an assignment to be
evaluated before the right-hand side.
Of course it does. Some values are returned by dereferencing a hidden
argument.
Nevermind. In the general case, a temporary still has to be generated
because of aliasing issues.
It's function arguments that should be evaluated left-to-right.
- Jonathan M Davis