You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deprecate compare in favor of lt and Ordering from Base? #243
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.
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
Activity
kmsquire commentedon Jan 18, 2017
@ararslan, for consistency, that sounds good!
However... the original purpose of
ltandBase.Orderwas 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: @StefanKarpinskinsajko commentedon Oct 1, 2026
Both
BinaryHeapandMutableBinaryHeapdepend onOrderingnowadays.nsajko commentedon Oct 1, 2026
Not sure if there are other types that take or should take an
Ordering, though.