This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
SCM_VALIDATE_...
- To: Guile Mailing List <guile at sourceware dot cygnus dot com>
- Subject: SCM_VALIDATE_...
- From: Dirk Herrmann <dirk at ida dot ing dot tu-bs dot de>
- Date: Thu, 25 May 2000 10:57:02 +0200 (MEST)
Hello list.
I just renamed SCM_VALIDATE_NUMBER_COPY to SCM_VALIDATE_REAL_COPY. But,
then I noticed an inconsistency. Currently we have a set of predicates
SCM_INUMP, SCM_BIGP, SCM_REALP, SCM_COMPLEXP. These predicates are _not_
comparable to the corresponding scheme level predicates, since, for
example, SCM_REALP(x) is true _only_ if x is a real object, but it is
false for an inum and a bigint. In contrast (real? x) would be true also
for integer and rational values.
The bad thing is, that in validate.h there is a predicate
SCM_VALIDATE_REAL, which does nothing else than checking if the SCM_REALP
predicate is fulfilled. This does not go along very well with a predicate
named SCM_VALIDATE_REAL_COPY, which accepts anything real in the
real? sense.
This mismatch in behaviour is confusing and I think we should come up with
something better.
Best regards
Dirk