Role of Base.Order

I was thinking about submitting a PR to extend findmax & friends to

findmax(itr; lt, by, rev)

similar to Base.sort!, but I found that the latter has an order argument, which uses constructs defined in the Base.Order module, for which I could not find documentation, but the source indicates that various ordering constructs encapsulate the role of by, lt, and rev in a single comparison.

I wonder if someone could clarify the role of Base.Order, and the application of the lt(ord, a, b) form, specifically,

  1. are we supposed to use it for new functionality?

  2. should the keyword argument interface still be available as a wrapper?

  3. is there more documentation?


I recall tracing through the code once… i also want to get a clear understanding from someone who knows.


1 Like