3 ms·
1. Float64Slice 2. IntSlice 3. StringSlice http://golang.org/pkg/sort/ http://golang.org/pkg/sort/
by sdegutis 12y ago
1. Float64Slice
2. IntSlice
3. StringSlice
http://golang.org/pkg/sort/ http://golang.org/pkg/sort/
- stcredzero 12y agoAh yes, I've run into this. It's certainly not some kind of "rabbit hole." So basically, there's a few lines of boilerplate for each time you want to sort something. So this is O(1) additional typing per sorted type, which is what it would be for generics. You're trying to kill your argument with faint support? EDIT: Granted, it is an unusual formulation, and far less convenient.
- sdegutis 12y ago1-A. SearchFloat64s 2-A. SearchInts 3-A. SearchStrings http://golang.org/pkg/sort/ http://golang.org/pkg/sort/
- stcredzero 12y agoHo hum. Same arguments apply. Also O(1) per type, just like generics.
- deleted 12y ago[deleted]