in reply to Debating With Friends
Both assignments have to have been performed before the eq is evaluated so chances are eq is seeing the same value for $x. However there is no guarantee that that will be the case. The compiler could choose to cache the value from the left expression in which case the result would be false.
As you hint, that is fundamentally broken code - in any context!
|
|---|