On 08/05/17 22:43, Paul Sandoz wrote: >> Given any "swap(exp, new)" function can be implemented as >> "exchange(exp, new) == exp" I'm not sure why we have two complete >> sets of functions all the way through. But I guess that is a >> different issue. :) > > Yes, it might be possible after some careful performance analysis > (we might run into some subtle issues).
They don't quite generate the same code, and there is no way to write an "Exchange" version of a weak "Swap". Andrew.