Fwd: Re: Numerical limits (fixnum vs bignum) Lassi Kortela (20 Sep 2019 22:42 UTC)
Re: Numerical limits (fixnum vs bignum) Lassi Kortela (20 Sep 2019 22:51 UTC)
(missing)
Re: Numerical limits (fixnum vs bignum) Lassi Kortela (21 Sep 2019 07:57 UTC)
Re: Numerical limits (fixnum vs bignum) John Cowan (21 Sep 2019 15:21 UTC)

Re: Numerical limits (fixnum vs bignum) Lassi Kortela 21 Sep 2019 07:57 UTC

> I think that the domain of all *char* arguments should be all characters +
> all bytes (exact integers 0-255).  The domain of offsets would be all
> fixnums. That should do it.

I would extend that so the integer arguments must accept at least the
full range of character codes supported by the implementation.

So most Schemes, where all characters fit in a fixnum, can implement
this SRFI using fast fixnum math (fx+ and fx<? or the built-in operators
in C). If a Scheme is exotic enough that chars can be bignums, it has to
fall back to the generic bignum-capable procedures + and < which are
slower but still work. This seems the best compromise to me.