They're not mnemonic for any specific usage because they have more than one possible specific usage in the language.
Besides, what kind of sense does '+' make for addition? It's also purely historical.
They're not mnemonic for any specific usage because they have more than one possible specific usage in the language.
Besides, what kind of sense does '+' make for addition? It's also purely historical.
So you choose 'cell' as your name for a node. OK, that's .. fine.
Now you choose 'car' and 'cdr' for each cell's 'data pointer' and 'next-cell-in-list pointer'. How many 'WTF?s'* do you think you'd get in code review? (except from lispers, I guess)
* obviously it's a rhetorical question, no-one writes or says WTF (out loud) in actual code reviews I hope.
Your names are too verbose.
node->data
node->next
Zero "WTF"s
The point is they are 'wrong' in every context. For LISt Processing, they should probably default to something to do with lists.
And caaar et al are a fine example of why I completely skipped common lisp in favour of newer lisp-likes. Perhaps it happens to all languages eventually, people add a convenience here, an shortcut there, and a doodad here, and before long you have an impenetrable thicket.
And these things seem convenient, but they are a huge extra cognitive load, and impose a further learning cost even to practicing experts who have to keep up with the latest doodads.