Newsgroups: comp.lang.clos Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!lucid.com!jonl%kuwait From: jonl%kuwait@lucid.com (Jon L White) Subject: Elements of CLOS Style Message-ID: <9106270130.AA13054@kuwait> Sender: daemon@cis.ohio-state.edu Organization: The Ohio State University Department of Computer and Information Science References: <19910626133701.1.JMORRILL@adams.bbn.com> Date: Thu, 27 Jun 1991 01:30:15 GMT Lines: 30 I rather like the idea of some community-based style guidelines; at the very least, it would provide a resevoir of FAQ's -- like, suggesting to use PROGN method combination rather than explicit kludges. But a couple of explicit comments. re: 1. If it can be done without extending the MOP, don't extend the MOP. Do you mean to say "make use of" rather than "extend"? re: 5. Avoid the use of TYPEP. Replace (typep object 'frog) with (frog-p object) where: This would be a very implementation-specific piece of advice, *if* the issue you are worried about is running speed. Recent discussions on the common-lisp@mcc.com email list showed that most implementations do some very aggressive optimizations for TYPEP (and even after they are fixed up for the kinds of glitches that lgm pointed out, they stil shouldn't be much worse than calling a random generic function or so.) If the issue is, however, only the stylistic one of not using the generalized membership tester -- TYPEP -- well, then I won't have much to say now about that. -- JonL --