JuliaLang/julia — pull request #3665 by StefanKarpinski (2013-07-10 10:45:56+00:00)
Title: sorting API refactor: `alg` and `order` keywords

Quoting the main commit:

> The idea here is that the ordering and algorithm for sorting are two orthogonal parameters that have sensible defaults: neither, both or either can be independently specified. The resulting API is slightly more verbose but also somewhat more self-documenting.
>
> Another sign that this might be on the right track is that this change reduces the LOC of base/sort.jl by 41 lines and reduces the method count of sort, for example, from 12 to 6.

Still needs deprecation methods before merging, but I thought I'd put it out there for feedback.

Note: I really wish that the `lt` and `by` ordering variations could be cleanly specified this way too – that would really cut the API down to a nice lean size without sacrificing any functionality. But I can't figure out a good way to do it.