** Are Basic Types Objects?**

There is an advantage of consistency if basic types such as ` integer`
and ` real` are objects. However:

- A
*boxed*number requires more storage. (16 bytes for Java`Integer`vs. 4 bytes for`int`.) - A statement
`i = i + 1`requires allocating a new object (and garbage collecting the old one): a significant performance penalty.

Lisp codes small integers as special pointer values, eliminating the need to box small integers; reals are boxed.

Java caches and reuses small ` Integer` values from -128 to 127.

An alternative is to have * both* boxed and unboxed numbers; this
improves performance but results in an inconsistent type system.
Java uses this method; as a result, a generic method that does comparison
may have to be recoded 6 times because of type inconsistencies.