2 ms·
Because equality should be transitive. If a == b and b == c, then it should be the case that a == c. [1] == 1 and 1 == [1], so it should be the case that [1] =
by mikeash 13y ago
Because equality should be transitive. If a == b and b == c, then it should be the case that a == c.
[1] == 1 and 1 == [1], so it should be the case that [1] == [1].
Just because it's what happens when you apply the rules of the language doesn't mean it actually makes sense.