This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

SCM_VALIDATE_...


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]