DataStructures.jl
DataStructures.jl copied to clipboard
Deprecate compare in favor of lt and Ordering from Base?
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.
@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 https://github.com/JuliaLang/julia/issues/19295. Cc: @StefanKarpinski