Go Identity Equality Comparability: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Go Language 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>")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
=Internal=
=Internal=
* [[Go_Language#Identity,_Equality,_Comparability|Go Language]]
* [[Go_Language#Identity,_Equality,_Comparability|Go Language]]
=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: