This page is part of the web mail archives of SRFI 114 from before July 7th, 2015. The new archives for SRFI 114 contain all messages, not just those from before July 7th, 2015.
Alex Shinn scripsit: > Could we have a (srfi 114 base) library that provides only the > predicates and accessors, and possibly some subset of default > predicates? (notably eq? is special) I'm okay with this idea in the abstract, but I think that list is *too* short. If there's to be a base library, it should contain what a client of comparators needs: predicates (3), accessors (4), primitive applicators (5), which are often more useful than accessors, comparison syntax (7), comparison predicates (5), and maybe interval predicates (4) and min/max (2). Plus eq, eqv, and equal (3), which need to be special cased by some libraries. That's 27 to 33 identifiers. By comparison, the full library has 76 identifiers. > Nitpick: comparator-comparison-procedure? would be better named > comparator-has-comparison-procedure?. Excellent point. Fixed. > But do we need this given the accessor? Yes. The accessor always returns a procedure, even if it's an automatically generated error procedure; if you don't want to call it blindly and try to catch the error, you need the predicate. > You're overloading "compare" to mean both the abstraction and ordered > comparisons. Could we rename the ordering to be something like "less" > or "order"? The abstraction is always called a comparator. -- One Word to write them all, John Cowan <cowan@xxxxxxxx> One Access to find them, http://www.ccil.org/~cowan One Excel to count them all, And thus to Windows bind them. --Mike Champion