Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Car and cdr

Name: Anonymous 2011-06-11 12:46

The names of the functions car and cdr are historical accidents: they de-
rive from the original (1959) implementation of Lisp on the IBM 704 at MIT.
The machine architecture included 15-bit ``address" and ``decrement" fields in
some of the (36-bit) loop-control instructions, together with additional in-
structions to load an index register from, or store it to, one of these fields
within a 36-bit memory word. The designers of the Lisp interpreter decided
to make cons cells mimic the internal format of instructions, so they could
exploit these special instructions. In now archaic usage, memory words were
also known as ``registers." What might appropriately have been called ``first"
and ``rest" pointers thus came to be known as the CAR (contents of address
of register) and CDR (contents of decrement of register). The 704, inciden-
tally, was also the machine on which Fortran was first developed, and the first
commercial machine to include hardware floating point and magnetic core
memory.

Name: get_lost_you_moron 2011-06-11 13:26

1/10

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List