transitivity does not imply type-checking Matthias Radestock (19 Nov 2005 11:16 UTC)
Re: transitivity does not imply type-checking Jens Axel Søgaard (19 Nov 2005 18:08 UTC)
Re: transitivity does not imply type-checking Matthias Radestock (20 Nov 2005 09:37 UTC)
Re: transitivity does not imply type-checking Jens Axel Søgaard (20 Nov 2005 10:04 UTC)
Re: transitivity does not imply type-checking Matthias Radestock (20 Nov 2005 12:53 UTC)
Re: transitivity does not imply type-checking Jens Axel Søgaard (20 Nov 2005 13:32 UTC)
Re: transitivity does not imply type-checking Matthias Radestock (20 Nov 2005 18:39 UTC)

transitivity does not imply type-checking Matthias Radestock 19 Nov 2005 11:16 UTC

In section "Why are <? etc. procedures, not macros?" of the srfi
document it says

<quote>
... one can even require the compare procedures to check the types of
all arguments, even if the result of the comparison is already
known. This is what Section 6.2.5 of R5RS calls ``transitive`` behavior
of the predicates =, <, etc.
</quote>

It is true that R5RS requires the predicates to be transitive. However,
I cannot see how that implies that unused arguments must be
type-checked, as is asserted in the above.

Take for example the following definition of =:

(define (= x y . rest)
  (and (number? x) (number? y)
       (prim= x y)
       (or (null? rest) (apply my= y rest))))

I claim that this meets the transitivity requirement of R5RS, assuming
prim= is transitive, yet it only type-checks used args.

Matthias.