I never really understood why a standard library would insist on having a single "sort" function (or at best, a "sort" and "stable sort"). Why not just provide explicit quick sort, merge sort etc. functions and let users choose which they want? Sorting is one of the first things a budding computer scientist learns, and the research on sorting algorithms is well-trodden ground by now, so I don't see how it could be a usability issue. I'd like to be able to choose from these criteria without having to rely on external libraries:
- How does it perform on average?
- How does it perform on pathological inputs?
- Is it stable?
- Does it allocate?
Not to mention constraints that an application can take advantage of:
- What if the data is already mostly sorted? (insertion sort)
- What if writes are very expensive? (cycle sort)
- What if all the data are integers? (radix sort)
And so on. Trying to force a one-size-fits-all solution seems rather silly at this point.