From ... From: Erik Naggum Subject: Re: Lisp is alive, was "Re: Common LISP: The Next Generation" Date: 1996/09/19 Message-ID: <3052160011407240@naggum.no>#1/1 X-Deja-AN: 184034877 sender: erik@arcana.naggum.no references: <842908513snz@wildcard.demon.co.uk> <323f7b48.3843721@news.primenet.com> <3052030527425472@naggum.no> <51s041$hmj@news.jf.intel.com> organization: Naggum Software; +47 2295 0313; http://www.naggum.no newsgroups: comp.lang.lisp [Mike Haertel] | Of course, when using lisp "read" you lose comments and other | formatting. a reader-macro bound to #\; may gobble up the the rest of the line and return it as a list (|;| "rest of line"). similarly for #|...|#. the formatting would be lost, but if it was generated by machine, it can be regenerated without loss, which is my second point... | So it's suitable, perhaps, for writing source-code munging tools which | are expected to produce results for machine consumption only. there is very little variation in formatting styles for Lisp compared to other languages. when there is variation, the pretty-printer can be customized by the same programmer that wrote the source code. I don't think a Lisp programmer would indent by hand, and even those that don't follow customary formatting styles modify the pretty-printer to suit their needs. in effect, the code that they write is already indented by machine. | But if you want to write a source-code formatter like "indent", or a | pretty printer, it's just about as difficult in Lisp as any other | language, because of the non-syntactic stuff you have to deal with. you really should take a look at GNU Emacs' lisp-mode and cc-mode. you betray ignorance of existing systems that implement "indent" for numerous languages and their relative sizes and complexity. cc-mode is at least an order of magnitude more complex than lisp-mode, including the support mechanisms. #\Erik -- those who do not know Lisp are doomed to reimplement it