4 ms·
FWIW, “comparable” and “ordered” are well defined terms in the Go language specification: https://golang.org/ref/spec#Comparison_operators https://golang.org/r
by typical182 6y ago
FWIW, “comparable” and “ordered” are well defined terms in the Go language specification:
https://golang.org/ref/spec#Comparison_operators https://golang.org/ref/spec#Comparison_operators
- MHordecki 6y agoThe vocabulary from that language spec is not even followed consistently in the language's own standard library. The `strings.Compare`[1] function is used to establish ordering, in the spec sense. You'd think they would name it "Order". Similarly, the popular go-cmp[2] library provides `Equal` for equality, instead of `Compare`. [1]: https://godoc.org/strings#Compare https://godoc.org/strings#Compare [2]: https://github.com/google/go-cmp https://github.com/google/go-cmp
- nsajko 6y agoSo what?