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]

Re: SCM_VALIDATE_...


Jim Blandy <jimb@savonarola.red-bean.com> writes:

> I guess my point is this: it doesn't seem to me like the hierarchy of
> representations and the hierarchy of number kinds (real?, integer?,
> etc.) are necessarily identical.  Are they?

They are, and, in my view, should continue to be identical in the
sense that the representations are the leaves of the numeric
hierarchy.

For example, there should not exist an object of class <complex> which
has a zero imaginary part.

I think this kind of discipline keeps things simple and actually can
contribute to speeding up some operations.  I'm for example very happy
that 0 is always a <fixnum> (currently "INUM"), even if it's the
return value of a subtraction between <bignum>s, otherwise the zero
test would be terribly complicated.

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