Newsgroups: comp.lang.lisp
From: Duane Rettig <du...@franz.com>
Date: 2000/03/28
Subject: Re: Dangling Closing Parentheses vs. Stacked Closing Parentheses
"Anthony Cartmell" <AJCartm...@csi.com> writes: It's because you haven't yet separated your IDL writing style from > "Erik Naggum" <e...@naggum.no> wrote in message > news:3163031395198264@naggum.no... > > such as their own lines. in Common Lisp, the list structure is much > less > > important than the indentation, and the perspicuity of normal > indentation > > rules is sufficiently high that the parens are mainly used there for the > > machine to use, not humans. therefore, humans would tend to get parens > > in CL out of the (visual) way, while the braces in C must be very > visible. > Sorry for the "newbie" question, but I thought that the indentation was your Lisp writing style. In further entries on this thread, it seems you and David Cooper are coming to an agreement, but the agreement seems uncertain; it looks to me more like a justification to continue doing what each of you are doing, and not to understand where the real problem lies. I don't know IDL (ICAD Design Language) myself, so I asked the experts (people at KTI) and got an answer very quickly. Results below. > > different languages have different optimization parameters for almost I think you are influenced in your Lisp layout style by your IDL > > every facet of their expression. trying to optimize CL code layout with > > the parameters from C is completely braindamaged and merits nothing but > a > > snort, and people who are _that_ underdeveloped in their understanding > of > > the differences between languages should just be sedated and put away. > I lay my Lisp code out the way I do for the reason given above, and not style, so this statement would not quite be true. I could not have argued this yesterday, but now that you are coming to the conclusion that IDL is not Lisp, it's time to finish off this earlier argument. > > which.) I think the need to understand how things came to be applies to Eight years sheds no light on a person's experience level. As a musician > > everything, but retracing the steps of decisions made by large groups of > > people is usually quite depressing, so there is wisdom in accepting the > > authorities at times. yet, accepting or rejecting authorities _because_ > > they are authorities is really retarded and people who are prone to this > > should also be sedated and put away. > Couldn't agree more. What I'm trying to do, prompted by criticism of my since childhood, I was always taught the adage "Practice makes perfect", but never got any good until I realized that the correct version of this adage is "Perfect practice makes perfect." If you practice mistakes, then you will only perfect the mistakes. What is the mistake here? It is the mixing of Lisp layout style with IDL layout style. > Does anyone know? When in doubt, ask experts. I did, and got an answer from Stanley Knutson of KTI, who gave me permission to post his answer. He summarized the parenthesis question in a further email exchange by saying: >> As I said in the style guide, the only places where a single ) is good Here is (most of) his original mail to me: >> is for closing a 'section' of the defpart. ======== Thanks for asking. ICAD style has been hottly debated about every two years ICAD Defparts have their own needs that are not reflective of general lisp I've attached a short style guide that I've written for our internal use. - Stanley ------=_NextPart_000_0008_01BF97DF.603B6670 ICAD defpart coding style suggestions 3/27/2000 Stanley Knutson The goal is to enhance readability for large defparts Example: (defpart my-application (basic-application :examples :inputs ;; the :%%internal-width is an intermediate ;; -------------------------------------------------- )) RULES: 1) CAPITALIZE the attribute, method and part names. 2) Put a comment for almost evey attribute, part or method. 3) Put a blank line between each defpart and attribute 4) The closing ) for each section of the defpart 5) Separate the sections with ;;------ lines 6) Put the sections in this order usually: 7) the very end of the defpart can have the )) to close the last 8) Indent as per emacs ctrl-meta-q WITH THE ICAD INDENT RULES 9) You can group multiple closing )) on one line 10) name internal methods and defparts with %% so they don't 11) Put one "logical unit" in a file: this usually means The exception is a set of several small closly-related functions. 12) Whenever possible, group the strings that customers will As of R7.1, we now have a 'resource string' object ------=_NextPart_000_0008_01BF97DF.603B6670-- -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||