Skip to content

Deprecate compare in favor of lt and Ordering from Base? #243

Open

Description

@ararslan

In Base and elsewhere, the preferred way of doing comparisons as is done here with compare and Comp is through lt with Base.Order. Thus I propose that, for consistency, this package be updated to deprecate its own comparison functionality in favor of that from Base. If this seems like a good idea, I can submit a PR.

Activity

  1. kmsquire commented on Jan 18, 2017

    @kmsquire
    Member

    @ararslan, for consistency, that sounds good!

    However... the original purpose of lt and Base.Order was to allow specialization of functions for different comparison functions, since it used to not be possible to pass in and inline function arguments. However, since functions are now their own types, these functions can probably go away all together, and comparison functions can be passed in directly. See JuliaLang/julia#19295. Cc: @StefanKarpinski

  2. added this to the 1.0 milestone on Sep 4, 2020
  3. nsajko commented on Oct 1, 2026

    @nsajko
    Member

    Both BinaryHeap and MutableBinaryHeap depend on Ordering nowadays.

  4. nsajko commented on Oct 1, 2026

    @nsajko
    Member

    Not sure if there are other types that take or should take an Ordering, though.

  5. reopened this on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions