Last call for comments on SRFI 228: Composing Comparators Arthur A. Gleckler (15 Nov 2022 21:03 UTC)
Re: Last call for comments on SRFI 228: Composing Comparators Marc Nieper-Wißkirchen (16 Nov 2022 12:17 UTC)
Re: Last call for comments on SRFI 228: Composing Comparators Marc Nieper-Wißkirchen (16 Nov 2022 12:34 UTC)
Re: Last call for comments on SRFI 228: Composing Comparators Daphne Preston-Kendal (16 Nov 2022 12:53 UTC)
Re: Last call for comments on SRFI 228: Composing Comparators Marc Nieper-Wißkirchen (16 Nov 2022 13:18 UTC)
Re: Last call for comments on SRFI 228: Composing Comparators Marc Nieper-Wißkirchen (16 Nov 2022 18:44 UTC)
Re: Last call for comments on SRFI 228: Composing Comparators Marc Nieper-Wißkirchen (16 Nov 2022 19:18 UTC)
Re: Last call for comments on SRFI 228: Composing Comparators Marc Nieper-Wißkirchen (16 Nov 2022 17:34 UTC)
Re: Last call for comments on SRFI 228: Composing Comparators Daphne Preston-Kendal (18 Nov 2022 19:06 UTC)
Re: Last call for comments on SRFI 228: Composing Comparators Daphne Preston-Kendal (23 Nov 2022 10:10 UTC)
Re: Last call for comments on SRFI 228: Composing Comparators Daphne Preston-Kendal (26 Nov 2022 10:54 UTC)
Re: Last call for comments on SRFI 228: Composing Comparators Marc Nieper-Wißkirchen (26 Nov 2022 11:22 UTC)
Re: Last call for comments on SRFI 228: Composing Comparators Arthur A. Gleckler (23 Nov 2022 19:43 UTC)

Re: Last call for comments on SRFI 228: Composing Comparators Daphne Preston-Kendal 18 Nov 2022 19:06 UTC

On 16 Nov 2022, at 13:03, Lassi Kortela <xxxxxx@lassi.io> wrote:

>> - make-product-comparator and make-sum-comparator are defined to take zero or more comparators.  It'd be better that the behavior when no comparators are explicitly stated.  Or we may define them to take at least one argument.

Hmm, I’m not sure that a sensible base case can actually be defined. Let me think about it.

>> - I'm implementing srfi-228 for Gauche from the srfi text and find the description of above two procedures a bit confusing, because the elements of comparators (type test, equality, ordering and hashing) are all written in one paragraph.  How about itemize each element?

If it would really help, I will change this, although all it would do is split four sentences into four bullet points with nearly identical  – it’s not one big run-on sentence, much as I do have a tendency to write those.

> The names make-product-comparator and make-sum-comparator are quite long. Could the "make-" prefix be dropped?

I’m not the kind of Schemer who takes particular objection to long names. As Marc has pointed out, they conform to the usual pattern for naming constructors in Scheme, and constructors of comparators in particular.

> The terms "sum" and "product" are obtuse. I assume they refer to math (category theory?), as in sum and product types. Are there everyday words that would say something close enough? The description is also hard to understand.

Marc has pointed out that the analogy to product types is wrong, and I now see why. In practice, the main reason you would use make-product-comparator is to make a comparator over the fields of a record type, which is a product type. make-product-comparator is, strictly, actually more general than this, but as I expect that to be the main use in practice, I will keep the name for now.

If someone can suggest a satisfactory pair of names by the end of the last call, I will change them, but otherwise, I’ll keep them as they are, notwithstanding the mathematical incorrectness of the latter name. Marc also suggested a non-mathematical name would avoid any potential for someone to come along and point out that mathematical terms are being used ‘incorrectly’, but we’ve both failed to come up with anything so far. (The proposal must make the natures of both procedures, and how they differ from each other, clear.)

Daphne