Map functions (can) do more than just equality comparisons
mathguy, November 24, 2022 - 10:18 pm UTC
This answer gives the impression that map functions are only used to define "equality" of objects, when in fact they are also used for inequality comparisons.
For example, if an object type "PO" (purchasing order) has "quantity" and "unit price" among its properties, the map function may return "quantity" times "unit price" (the total value of the PO), and use that for inequality comparisons, not just for equality. The answer doesn't need to give a full example like this, but it shouldn't give the impression that it's all about defining "equality" of objects.
The comparison to primary keys is particularly misleading - it is perfectly OK for distinct objects to map as equal: see the PO example, where two distinct PO's (distinct order numbers, as PK) can have the same total value, and therefore map as equal.