3 ms·
> I'm not sure making all comparable objects in Go usable as map keys is a good idea either. Was a good idea since, it's part of the spec-definition of Go: >
by masklinn 4y ago
> I'm not sure making all comparable objects in Go usable as map keys is a good idea either.
Was a good idea since, it's part of the spec-definition of Go:
> A map is an unordered group of elements of one type, called the element type, indexed by a set of unique keys of another type, called the key type. [...] The comparison operators == and != must be fully defined for operands of the key type
TFA is merely reusing that.