It’s the same thing when I see test code that uses foo, bar, and baz as variables / strings instead of something more memorable like apple, banana, and cherry (or preferably something even more relevant to the code being tested). I feel like I have to work harder to understand what the tests are actually testing when I don’t have a good mental association with the variables under test. I get that it’s something programmers just do, but I’m really not a fan.
Maybe I’m an odd one though.
Date: 5 March 1980 08:54-EST
From: Mark L. Miller <MILLER at MIT-AI>
To: Dave.Touretzky at CMU-10A, RWK
cc: KMP, HIC, BUG-LISP
Re: CAR and CDR
Of course, you could rename them to, e.g., "LHS" and "RHS" for "Left Hand
Side" and "Right Hand Side". This would address the composition argument
in favor of CAR and CDR: CADR -> LRHS (left-hand-side of right-hand-side),
CDADADR -> RLRLRHS, and so on. It's easy to provide these as macros.
Later, you can explain that the original names are CAR and CDR, and isn't
that silly, etc.
Regards, Mark[1] Look at e.g. https://madnight.github.io/githut/. The most popular Lisp is Clojure, with a whopping 0.33% market share. Scheme and Common Lisp don't even make it to the top 50.
What more-user-friendly terminology do you suggest?
CLR: cell levo/left reference.
CDR: cell dexter reference.
Organic chemistry uses these letters and prefixes. E.g. "L-glutamine", "D-glucose" (a.k.a "dextrose").
The H and S (hand side) don't really contribute anything. (Yes, left is side and a hand).
I don't think car and cdr are newbie hostile; they are rather troll-fertile.
In any case, I think it makes sense, even if it's not common within programming culture.