[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

issue BOGUS-FIXNUMS (initial draft)



   Date: 12 Jul 88 16:00 PDT
   From: Masinter.pa@Xerox.COM

   Sigh, that's just the kind of code that is very non-portable and that I'd
   like to discourage programmers from writing. I've tried to import stuff
   from a CL that had 31 bit FIXNUMs into a system that had 17-bit FIXNUMs
   and, out of sheer laziness, they said FIXNUM when they really meant
   (signed-byte 24).

It's only non-portable if used on values which are not guaranteed to to be
within the FIXNUM range.  If FIXNUMs were guaranteed to be at least
(signed-byte 24), it would be a perfectly valid program.  Since they're not,
you just had the misfortune of working with buggy code.  Buggy code can be
written using all sorts of otherwise-useful CL constructs.

The problem is of course that currently nothing is guaranteed to be in the
fixnum range, so even programs that use FIXNUM for numbers between -1 and
1 are nominally buggy.  I think the solution is to guarantee some reasonable
range and be done with it.