News for hackers. Stuff that matters.
Re:The Origin of CAR and CDR in Lisp (2005) by thatswrong0 on Tuesday December 26, 2017 @11:46AM (#16009355)
I think I prefer this as well. I think the importance of the mnemonic aspect can’t be overstated.. even though I did get _used_ to CAR and CDR, I feel like I was never immediately able to comprehend code that used them.. I had to always perform a mental translation as if I were somewhat bad at French or something and didn’t intuitively know the words.

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.

Re:The Origin of CAR and CDR in Lisp (2005) by lisper on Tuesday December 26, 2017 @11:54AM (#16009397)
Another possibility is LHS and RHS for Left Hand Side and Right Hand Side (if you want to emphasize the use of a cons cell as a pair rather than a linked list).
Re:The Origin of CAR and CDR in Lisp (2005) by kbp on Tuesday December 26, 2017 @12:08PM (#16009460)

    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
Re:The Origin of CAR and CDR in Lisp (2005) by kazinator on Tuesday December 26, 2017 @02:56PM (#16010578)
Shows you how resilient car and cdr have been against decades of complaining and bikeshedding. That just reaffirms them.
Re:The Origin of CAR and CDR in Lisp (2005) by lisper on Tuesday December 26, 2017 @04:22PM (#16011122)
I would accept that if Lisp were a runaway success, but it's not. It is very nearly a dead language [1]. It is entirely possible that the unwillingness of the Lisp community to give up in this obscure terminology in favor of something more user friendly contributed to its demise.

[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.

Re:The Origin of CAR and CDR in Lisp (2005) by kbp on Tuesday December 26, 2017 @06:14PM (#16011662)
> It is entirely possible that the unwillingness of the Lisp community to give up in this obscure terminology in favor of something more user friendly contributed to its demise.

What more-user-friendly terminology do you suggest?

Re:The Origin of CAR and CDR in Lisp (2005) by lisper on Tuesday December 26, 2017 @06:53PM (#16011821)
Did you not read the upstream comments? FST and RST, or LHS and RHS depending on whether the intent is to access the cons as a linked list or a pair.
Re:The Origin of CAR and CDR in Lisp (2005) by kazinator on Tuesday December 26, 2017 @07:20PM (#16011924)
The D in CDR already corresponds to "dexter-" (right); we just need "L" for "levo-":

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).

Re:The Origin of CAR and CDR in Lisp (2005) by lisper on Tuesday December 26, 2017 @07:41PM (#16012014)
The whole point of this exercise (if it has a point at all) is not to come up with acronyms with justifiable expansions, but to come up with something that is less newbie-bostile. I'm not sure CLR/CDR fits the bill any better than CAR/CDR. Part of the problem with CAR/CDR is that CAR is an English word that means automobile, and people get a little hung up on that when they first see it. Likewise, CLR is usually a shortened form of the word "clear". So I'm not sure that CLR/CDR is any better than CAR/CDR. One of the advantages of LHS/RHS and FST/RST is that none of those trigrams have any semantic baggage associated with them other than their intended meaning.
Re:The Origin of CAR and CDR in Lisp (2005) by kazinator on Tuesday December 26, 2017 @09:35PM (#16012445)
Why trigrams: (cl x) (cr x). cell left, cell right.

I don't think car and cdr are newbie hostile; they are rather troll-fertile.

Re:The Origin of CAR and CDR in Lisp (2005) by kazinator on Tuesday December 26, 2017 @04:41PM (#16011223)
CL was #45 in the car quarter of 2017; by cadr, it slipped into the long(er) tail.
Re:The Origin of CAR and CDR in Lisp (2005) by gugagore on Tuesday December 26, 2017 @03:12PM (#16010693)
You're not the first person I've heard of that doesn't like foo,bar,baz nonce variable names. But it's the first I've heard of someone preferring meaningful but irrelevant words over meaningless words.

In any case, I think it makes sense, even if it's not common within programming culture.