# Role of Base.Order

**URL:** <https://discourse.julialang.org/t/role-of-base-order/20661>\
**Category:** Internals & Design\
**Tags:** question\
**Created:** [February 11, 2019, 12:52pm UTC](https://discourse.julialang.org/t/role-of-base-order/20661 "2019-02-11T12:52:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [February 11, 2019, 12:52pm UTC](https://discourse.julialang.org/t/role-of-base-order/20661/1 "2019-02-11T12:52:15Z")

</div>

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

```julia
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?

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [February 12, 2019, 6:49am UTC](https://discourse.julialang.org/t/role-of-base-order/20661/2 "2019-02-12T06:49:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nalimilan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nalimilan/32/147_2.png) [@nalimilan](https://discourse.julialang.org/u/nalimilan)\
**Post date:** [February 12, 2019, 8:45am UTC](https://discourse.julialang.org/t/role-of-base-order/20661/3 "2019-02-12T08:45:35Z")

</div>

Related:  
[https://github.com/JuliaLang/julia/pull/22388](https://github.com/JuliaLang/julia/pull/22388)
