This is a nice advertisement for deriving standard methods like comparisons, in languages that support that.
deriving
In generic Go, you can use < on any of the numeric types, but it’s not defined on structs, so it wouldn’t be defined for the example.
Tl;dr they had accidentally used <= instead of < in a comparison function for a sort, causing a lot of unnecessary swaps of equal values.
<=
<
…and it wasn’t sync -> async…
sync -> async
This is a nice advertisement for
deriving
standard methods like comparisons, in languages that support that.In generic Go, you can use < on any of the numeric types, but it’s not defined on structs, so it wouldn’t be defined for the example.
Tl;dr they had accidentally used
<=
instead of<
in a comparison function for a sort, causing a lot of unnecessary swaps of equal values.…and it wasn’t
sync -> async
…