3 ms·
The use of car and cdr are such a surprisingly concrete implementation detail in the birth of a language that was designed to be mathematical. The most basic an
by dkarl 2y ago
The use of car and cdr are such a surprisingly concrete implementation detail in the birth of a language that was designed to be mathematical. The most basic and famous operators of "List Processor" were created to operate not on lists but on conses, an element in a particular machine representation that Lisp uses to build data structures! Not only are conses not always interpreted as lists, but a very very important list, the base case for recursive functions on lists, is not represented by a cons.
Sixty years later, most Lisp programs are still full of operations on conses. A more accurate name for the language would be "Cons Processor!" It's a reminder that Lisp was born in an era when a language and its implementation had to fit hand in glove. I think that makes the achievement of grounding a computer language in mathematical logic all the more remarkable.
- fuzztester 2y agomaybe related to the need to conserve CPU registers in machines of the time? https://en.m.wikipedia.org/wiki/CAR_and_CDR https://en.m.wikipedia.org/wiki/CAR_and_CDR In any case, ASTute observation er, ASTute ;)
- deleted 2y ago[deleted]