But when I did have the need to sort stuff, I have found it annoying. Even C has a more convenient solution for this problem. (Admittedly, Go's sort.Sort can work for data structures other than arrays/slices.)
Like I said, it has not been a sufficiently large problem to really bother me, but it is not a pretty solution, IMHO.
Of course, one might argue that the creators of Go knew that sorting things was not such a common problem for their target audience, and thus they made the trade off to make sorting suck in return for overall simplicity; Go's type system makes it practically impossible to implement a type-generic sorting function like C's qsort(3) without sacrificing performance or making the language more complex.
So maybe that is one of the trade offs we have to make. I still wish for a better solution, even if that may be impossible without turning Go into another C++. And if you like C++, that is totally fine, it has a number of very big advantages. But then you do not need Go to become another C++ if you have the original right there; and even if you wanted to get away from C++ without giving up the benefits it offers, D looks like a more promising alternative.
It's annoying, especially since basic generics are simpler than interfaces.
> If you're talking about "100s of different Enterprise Business Objects (TM) structs"
I don't write enterprise software. I sometimes need to sort things.
Again, it's a little clunkier in Go, but not unusably so.
Go is far from my favorite language, but the sheer amount of bad criticism by people that clearly don't use the language annoys me.
sort.Slice(s, func(i, j int) bool { return s[i].X < s[j].X })