3 ms·
"After several months and giving a few classes in LISP, we realized that 'first' and 'rest' were better names, and we (John McCarthy, I and some of the rest of
by gruseom 19y ago
"After several months and giving a few classes in LISP, we realized that 'first' and 'rest' were better names, and we (John McCarthy, I and some of the rest of the AI Project) tried to get people to use them instead. ... Alas, it was too late! We couldn't make it stick at all. So we have CAR and CDR."
So car and cdr have been around for 49 years, while first and rest have been around for 48 1/2. I don't think "historical reasons" explains the survival of car/cdr. How many other things that survive from the first 6 months of Lisp could be called accidental?
Edit: this reminds me of the survival of s-expressions. For a long time the plan was to replace them with m-expressions so that Lisp could be a "real" programming language like Fortran. But people kept preferring to write s-expressions. Eventually it became clear that s-expressions were not an unfortunate weakness at all, but one of the best things about Lisp. Obviously the names car/cdr aren't close to this important, but I do think that if there weren't something deeply right about them, they would have been discarded long ago.