2 ms·
I think the parent was saying car and cdr are confusing because they don't actually map to registers (i.e. address register and decrement register). On the othe
by anaphor 13y ago
I think the parent was saying car and cdr are confusing because they don't actually map to registers (i.e. address register and decrement register). On the other hand you don't have to think too hard about the composed versions of them (caddr, cadar, etc...) but they can easily make your code seem obfuscated. Racket offers both that and first/rest anyway so you can choose which style you prefer.
- ANTSANTS 13y agoI don't mind car, cdr, and their composed versions at all. `caddr` is much easier for me to read than `(head (tail (tail ...` I think their usage is sometimes a code smell (the ad-hoc structs I mentioned), but they're really useful when you want to deal with an "unlispy" list of tokens (say, a parser for a language that isn't Lisp).