Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!cmcl2!harvard!seismo!umcp-cs!aplcen!jhunix!ins_amrh From: ins_amrh@jhunix.UUCP (Martin R. Hall) Newsgroups: net.ai,net.lang.lisp Subject: Common LISP style standards. Message-ID: <2784@jhunix.UUCP> Date: Thu, 8-May-86 08:52:12 EDT Article-I.D.: jhunix.2784 Posted: Thu May 8 08:52:12 1986 Date-Received: Sun, 11-May-86 02:34:23 EDT Distribution: net Organization: AI Dept, Martin Marietta Baltimore Aerospace Lines: 36 Xref: linus net.ai:3210 net.lang.lisp:736 It seems that my original request for information on LISP coding standards was not very lucid. Let me clarify. We are doing everything in Common LISP, but are looking for standards in regards to coding *style*. For contract work, we need relatively explicit rules for these things. The standards should answer these types of questions: - How do you keep track of the side effects of destructive functions such as sort, nconc, replaca, mapcan, delete-if, etc? - When should you use macros vs. functions? - How do you reference global variables? Usually you enclose it in "*"s, but how do you differentiate between your own vars and Common LISP vars such as *standard-input*, *print-level*, etc? - Documentation ideas? - When to use DOLIST vs MAPCAR? - DO vs LOOP? - Indentation/format ideas? Or do you always write it like the pretty-printer would print it? - NULL vs ENDP, FIRST vs CAR, etc. Some would say "FIRST" is more mnemonic, but does that mean you need to use (first (rest (first X))) instead of (cadar X) ?? - etc, etc. It looks like I will be putting together the standards for our group here, but it would be nice to see some ideas other people had first. Anyone have anything? Thanks! -Marty Hall Arpa: hall@hopkins MP 600 CSNET: hall.hopkins@csnet-relay AI and Simulation Dept. uucp: ..seismo!umcp-cs!jhunix!ins_amrh Martin Marietta Baltimore Aerospace ..allegra!hopkins!hall 103 Chesapeake Park Plaza Baltimore, MD 21220 (301) 682-0917.