Possible new SRFI: Consolidated Comparators
Peter McGoron 02 Nov 2026 04:01 UTC
Hello,
SRFI 128 was voted into the Scheme Red ballot. However, the behavior of
default comparators is very tricky. They are the subject of two PFNs and
will behave in unpredictable ways if two comparators with overlapping
test predicates are added to it.
I think a successor SRFI that does away with the default comparator
interface would be better.
Such a successor can also incorporate SRFI 162 (sublibrary) and SRFI 228
(composing comparators).
There could also be some additions to the comparators library. I would
want them to be backwards compatible with old comparators. Some
interesting additions:
1. Hash function utilities[1].
2. Creating comparators from a three-way-comparison procedure.
Thoughts?
-- Peter McGoron
[1]:
https://codeberg.org/dpk/presrfis/src/branch/master/comparators-revised-consolidated.md#hash-function-helpers