4 ms·
No disagreement, having used Python a lot and finding it much nicer for this case. My compliments to Go on this were relative to the just how tedious the “imple
by LVB 4y ago
No disagreement, having used Python a lot and finding it much nicer for this case. My compliments to Go on this were relative to the just how tedious the “implement this sort interface” method was that TFA was describing. sort.Slice is definitely still pretty rote (I think I write the same Less() function 90% of the time?), but it’s at least fewer characters of rote!
I’m looking forward to generics improving this too. (e.g. https://github.com/golang/go/issues/47619#issuecomment-915428658 https://github.com/golang/go/issues/47619#issuecomment-91542...)