3 ms·
Comparison by value tends to be more useful, and more often what a user expects "==" to mean. In some ways, "==" mirrors the mathematical =. (Not exactly, of co
by deathanatos 9y ago
Comparison by value tends to be more useful, and more often what a user expects "==" to mean. In some ways, "==" mirrors the mathematical =. (Not exactly, of course, since mathematics is usually making statements of fact: x = 2 means x is equal to 2, not x is assigned the value 2.)
I think Python is a good example here, where referential comparison is the `is` operator: `a is b`.