chapel icon indicating copy to clipboard operation
chapel copied to clipboard

Supporting the `sortComparator` interface

Open jabraham17 opened this issue 7 months ago • 1 comments

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.

jabraham17 avatar Jul 12 '24 21:07 jabraham17