Re:The Origin of CAR and CDR in Lisp (2005)
by junke on Tuesday December 27, 2016 @02:51AM
(#13261868)
Keep calm and read the Common Lisp specification (http://clhs.lisp.se/Body/f_firstc.htm)
There are first, etc... accessors (other Lisps might define them too, it is so easy to implement). People are encouraged to use them, especially for lists, and are even encouraged to not use them but prefer objects with named slots.
The general advice is to reserve C..R functions for trees, but this is actually rarely needed, especially when using pattern matching.
As a general rule, I assume that I read most lines of the code not when I'm writing it, nor fixing a bug, but while I'm trying to locate a bug of unknown location. The complexity or trickiness of a function that you are actively modifying can be pretty high and you'll still grasp it. But a function not even involved with a problem needs to be even more legible if you don't want to repeatedly waste time contemplating it to determine if you should move on.