keyComparator requires implementing the key method
keyPartComparator requires implementing the keyPart method. Implementing the compare method is optional
relativeComparator requires implementing the compare method
The sortComparator is the mutually exclusive OR of these three interfaces. However it is not currently possible to implement this with the current interfaces design.
This PR will add a blank sortComparator interface to the Sort module. This interface is not meant to be publicly used yet (it does nothing), but it does reserve the name sortComparator in the Sort module.
This issue captures the desire from https://github.com/chapel-lang/chapel/issues/24857 to have a single interface to represent the functions that a comparator might define.
There are three kinds of comparators
keyComparator
requires implementing the key methodkeyPartComparator
requires implementing the keyPart method. Implementing the compare method is optionalrelativeComparator
requires implementing the compare methodThe
sortComparator
is the mutually exclusive OR of these three interfaces. However it is not currently possible to implement this with the current interfaces design.