Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rutgers!bellcore-2!bellcore!mbr From: mbr@flash.bellcore.com (Mark Rosenstein) Newsgroups: comp.lang.lisp Subject: Re: Matching Parens (was Virtues of LISP Syntax?) Message-ID: Date: 28 Sep 90 13:51:28 GMT References: <12676@accuvax.nwu.edu> Sender: news@bellcore.bellcore.com Reply-To: mbr@breeze.bellcore.com (Mark Rosenstein) Organization: Bellcore, Morristown, NJ Lines: 66 In-reply-to: lynch@aristotle.ils.nwu.edu's message of 27 Sep 90 18:44:43 GMT In article <12676@accuvax.nwu.edu> lynch@aristotle.ils.nwu.edu (Richard Lynch) writes: Path: bellcore!bellcore-2!rutgers!mailrus!accuvax.nwu.edu!mmdf From: lynch@aristotle.ils.nwu.edu (Richard Lynch) Newsgroups: comp.lang.lisp Date: 27 Sep 90 18:44:43 GMT Sender: mmdf@accuvax.nwu.edu Lines: 52 As far as interface goes, *I'M* using a Mac where more thought has gone into the interface than went into the whole compiler of most other systems. --Total aside ---- Error messages from the Symbolics compiler, and their use of the error system are quite impressive. For instance I make package errors often enuf so that when the debugger says, symbol not found. And then asks to use symbol in so-and-so package, man life is wonderful! --End total aside-- What precisely is silly about having clear, concise, simple, FOOLPROOF rules about where a matching paren can be found? Parens really aren't very interesting. To my mind code has a shape, that my editor (GNU) supports. "If" looks like (if (some-test) (yep-its-true) (nope-guess-again)) If it doesn't look like that well something's wrong. Defuns look like (defun hi-ima-function (some-arg some-other-arg &rest etc) (first-form) (second-form) (when (some-test) (do-some-stuff)) etc) [I'm not in lisp mode and my defun isn't in the first line, so I'm really not sure how many spaces m-c-\ would really put in, but I hope you get the idea]. Can you look at a print-out of your code (that is NOT debugged and MAY contain parenthesis errors) and immediately tell me where any given form is closed? Sure. It'll be indented wrong. First thing I do when I look at someone elses code is run formating over it. Otherwise its just characters. I can for mine. Of course you have to indent as well, but a lot of times in writing code that is long, tedious, and too dissimilar to turn into a function or macro (such as code that draws a lot of slightly different objects in a program that pays plenty of "attention to [my] user interface"), the forms that are being lined up may well be several screenfuls away from each other. I guess this is a stylistic point, but functions over a page make me queezy. I guess I'm not embarrased to write a function or macro that'll only be called once. I find that once I free the functionality, along comes some other piece of code that wants it. [A *LONG* time ago I was using SPF on an IBM mainframe. It allowed you to HIDE as many lines as you wanted (without deleting them, mind you) so that you could ignore the sections that you "knew" were right, and line up and concentrate on the rest. The hidden lines would be replaced by a single line with the text "XXXXX lines hidden" in its place. Would love to see this feature on my FRED editor in MACL. Anybody write this yet?] I guess I do all my hidden stuff in lots of little functions. And (slight sarcastic voice) I don't have all those empty lines with only parens on 'em), so my code may be more compact? Maybe it is all style, but first thing I'd do with the code you sent me is write a little GNU macro to move all them parens up. Mark.