3 ms·
It's because they are dealing with different things. In math, things are immutable, so you either "compare all fields" for the most fine-grained equality, or a
by moring 7y ago
It's because they are dealing with different things. In math, things are immutable, so you either "compare all fields" for the most fine-grained equality, or a more "coarse" equality that is compatible in the sense that if two things are "finely equal", they are implied to be "coarsely equal".
In programming, on the other hand, you have variables that change their value over time. Many, many problems with equality have to do with how they interact with time and change.
Those languages that stay away from (implicit) time and change, such as Haskell, don't have the same problems with equality. They do have other problems with equality being undecidable, which results in some types not being able to derive equality (especially functions, since automatically derived equality would mean to solve the halting problem).