Barry Margolin <email@example.com> wrote:
| Actually, a more accurate name might be "everything except small integers
| is a pointer". Fixnums are often the only data types that can be
| implemented as immediate data, and everything else has to be "boxed".
Hah! Hardly. Try: character, booleans, the empty list, and numerous
non-standard but widely-implemented magic objects sych as #<void>,
#<undefined>, #<unbound>, and #<eof>. Some implementations even choose
to represent small *reals* as immediates!
| But as I've said before, this is purely just an optimization.
And the reverse is true, too. For example, in SIOD Scheme everything
*is* a pointer, even small ints. There, the efficiency optimization is
to cons up a range of small ints at startup (typically -100..500, or so)
and have the primitive arithmetic operators check for their results being
in that range [a quick check] and if so return the pointer to the pre-cons'd
one [also quick, if pointers to them are stored in a table].
Rob Warnock, 30-3-510 <firstname.lastname@example.org>
SGI Network Engineering <http://reality.sgi.com/rpw3/>
1600 Amphitheatre Pkwy. Phone: 650-933-1673
Mountain View, CA 94043 PP-ASEL-IA
[Note: email@example.com and firstname.lastname@example.org aren't for humans ]