The result of the addition isn&#x27;t order dependent; whether or not there is overflow is order-dependent.<p>I put that into my original comment for the sake of completeness, in an additional edit after the floating-point remark. Ironically, it was to fend off smart-alecky follow-ups about how I <i>forgot</i> integer overflow.<p>A higher-level language should have a plus operator&#x2F;function that traps integer overflows if it doesn&#x27;t provide bignums.<p>If a sum function is defined as a simple left fold over the sequence using that plus, then part of the semantics of that sum is to throw the exception as soon as adding the next element from the sequence to the left accumulator overflows.<p>If an order-permuting operation is removed from the expression, it can introduce an overflow where there was none. Perhaps the programmer had that apparently useless order-permuting operation precisely to prevent overflow.