You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.
Equality comparison for map data types won't work as expected, in the sense that maps with the same contents can test as unequal (and have unequal hashes). This is because the internal state of a map depends on the order that keys were inserted and deleted.
One approach to this would be to guarantee that maps with equal contents always have the same internal representation. But that might not be easy or efficient.
Another approach would be to forbid hashing and equality comparison for maps (and for compound types containing maps). This would necessarily add a new "comparable" flag for compound types, which the compiler would need to track and enforce.
If we make these types non-comparable, we might want to allow programers to declare their own types non-comparable.
The text was updated successfully, but these errors were encountered:
Equality comparison for map data types won't work as expected, in the sense that maps with the same contents can test as unequal (and have unequal hashes). This is because the internal state of a map depends on the order that keys were inserted and deleted.
One approach to this would be to guarantee that maps with equal contents always have the same internal representation. But that might not be easy or efficient.
Another approach would be to forbid hashing and equality comparison for maps (and for compound types containing maps). This would necessarily add a new "comparable" flag for compound types, which the compiler would need to track and enforce.
If we make these types non-comparable, we might want to allow programers to declare their own types non-comparable.
The text was updated successfully, but these errors were encountered: