On Fri, Nov 18, 2022 at 9:06 AM Daphne Preston-Kendal <d...@nonceword.org>
wrote:

> On 16 Nov 2022, at 13:03, Lassi Kortela <la...@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.
>

That part is resolved by the replies to my post.  Sensible base cases can
be defined, and it makes sense to have them taking zero arguments.
 Besides, the current reference implementation already seems to give the
base cases.
It is a bit confusing that, for example, the equality predicate of the sum
comparator yields an error if no comparators are given.  However, such an
equality predicate would never be applied directly, since the type
predicate categorically rejects any arguments.

>
> >> - 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.
>

I think it helps.  For example, the first sentence of
make-product-comparator says "a comparator which compares ..."; but the
defining term used in srfi-128 comparators is "equality predicate" and
"ordering predicate", so it is clear to define "compare" in terms of those
predicates.

Reply via email to