That's not a solid justification IMO. One could argue that the following should also be obeyed:
- Addition is commutative.
a + b == b + a
. Doesn't work with strings. - Multiplicative inverses work.
(a * -1) + a == 0
(0 == ""
being the identity of+
). Doesn't work but can be ruled out by using UInt instead of Int, going against the typical API guidelines. - Multiplication distributes over addition.
n * (a + b) == n * a + n * b
. Doesn't work forn = 2
and non-empty stringsa
andb
.