Subject: Re: CAR, CADR, etc. vs FIRST, SECOND... (was Re: Please help (syntax problems?))
From: Erik Naggum <erik@naggum.no>
Date: 1999/02/22
Newsgroups: comp.lang.lisp
Message-ID: <3128669611030356@naggum.no>

* cbarry@2xtreme.net (Christopher R. Barry)
| One thing I dislike about using FIRST, SECOND and friends is if you ever
| want something like CDADR then your code is kinda - I don't know what the
| word I'm looking for is - "inconsistent" will have to do. Using SECOND to
| take the CADR of a list and then taking the CDADR of the same list just
| doesn't seem to be the most aesthetically pleasing thing to do to me.

  think of FIRST and SECOND as accessors into the first level of a list.
  think of CxR as accessors into a tree.  if you see (rest (second X)) and
  think CDADR is a better choice, you may need to think about what you're
  representing.  chances are a structure or class is a better choice than a
  list, or that destructuring things before proceeding is more legible.

#:Erik