chapel
chapel copied to clipboard
Supporting the `sortComparator` interface
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 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.