|
|
|
|
|
by IshKebab
1470 days ago
|
|
Go's method is like that because it didn't have generics, but it does have the advantage of allowing you to sort more complicated things, e.g. indexes into other data structures, or computed values. Sorting by key is a special case (admittedly the most common special case). |
|