type userList []*User
func (u userList) Len() int { return len(u) }
func (u userList) Swap(i, j int) { u[i], u[j] = u[j], u[i] }
func (u userList) Less(i, j int) bool { return u[i].Name() < u[j].Name() }
What change would you ever need to make to this code that would be at all difficult? The first two methods on userList are never ever ever going to change. The only thing you could possibly want to change is how to sort inside the Less method... and that code would be the exact same code you'd have to change no matter what language you're in. You still have to define the sort one way or another for non-trivial types.So, yes, it's some extra typing... but saying that it makes maintenance harder is just plain wrong.