Go Identity Equality Comparability: Difference between revisions
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
=Overview= | =Overview= | ||
The Go notion of '''comparability''' implies that the equality operators <code>==</code> and <code>!=</code> must return the correct values when used. | The Go notion of '''comparability''' implies that the equality operators <code>==</code> and <code>!=</code> must return the correct values when used. | ||
The instances of a type can be map keys as long as the type has an equality operator. <font color=darkkhaki>More here: [[Go_Maps#Overview]]</font> | The instances of a type can be map keys as long as the type has an equality operator. <font color=darkkhaki>More here: [[Go_Maps#Overview]]</font> | ||
<font color=darkkhaki> | |||
TODO: | |||
* https://go.dev/ref/spec#Comparison_operators | |||
</font> |
Latest revision as of 00:10, 29 August 2024
Internal
Overview
The Go notion of comparability implies that the equality operators ==
and !=
must return the correct values when used.
The instances of a type can be map keys as long as the type has an equality operator. More here: Go_Maps#Overview
TODO: