You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The algebraic rules can be quite complex and would require functional purity on all functions bound to the operands. a = (a + b) + c <=> a = a + (b + c) <=> a += b + c. a = a * b + c is not equivalent to a =* b + c because of precedence.
If A is a collection then we cannot use += because the language looks up by value. array[x] = array[x] + 1 will read by value, add and write by value.
There are also cases of aliasing that can confuse a compiler. a = b + c => a += c if &a = &b.
E.g.
a = a + b
can and should be written asa += b
in many cases. Would it be possible for magic to detect this kind of thing?The text was updated successfully, but these errors were encountered: