[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]

C*R chains should only be used for accessing homogeneous structures. If
you want the CADR of the FOO part of some list, you should write
(CADR (FOO l)), not (CADDAR l). If you have some structure so complex
that you think you need a C*R chain like CADADDADAR to talk about one
of its pieces, it's time you started naming some of those parts. Code
involving long chains of C*R cruft is low-level, non-abstract, bit-diddly
stuff. I have written it. I have been caused enormous pain trying to
figure out what code to change when I reformat that CDADR part of the
data structure and all calls to CDADADDR have to be changed to 
CDADADAR instead. "Oh, if I'd just spent the few seconds writing an
abstract macro to do the accessing", I say. But I didn't. Well, adding
more C*R functions to the language might just make it easier for someone
to screw himself that way. I just don't see the point. I think we should
encourage the use of automatic structure defining facilities like DEFSTRUCT
and forget about how they're implemented. (CAR (CDR ...)) compiles
just as well as (CADR ...), so I don't know why all the flaming about
adding some extra symbols to the language if I shouldn't even be using them
in code I'd like to feel comfortable talking about in polite company.

ps I, also, have written c*r auto-defining functions at some point.
   several different kinds. now i know better than to waste my time on it.