From ... From: Erik Naggum Subject: Re: Comments in LISP (was Re: Which one, Lisp or Scheme?) Date: 1997/02/04 Message-ID: <3064008491602501@naggum.no>#1/1 X-Deja-AN: 214252459 references: <3063817549865257@naggum.no> <5d39rk$4ag@caleddon.intelligent.co.uk> <3063966081632362@naggum.no> <5d582t$g5c@tools.bbnplanet.com> mail-copies-to: never organization: Naggum Software; +47 2295 0313; http://www.naggum.no newsgroups: comp.lang.lisp,comp.lang.scheme * Erik Naggum | I find the issue of comments to be simple. if you need them, you bind | the semicolon and the sharp vertical bar to reader macro functions that | return an object of the appropriate comment type, which also prints as a | comment in the usual syntax. your codewalkers then need to learn to skip | such objects. shouldn't be too hard. * Barry Margolin | If the comments aren't removed by the reader, how do you ensure that all | user-written and third-party macros don't see them? Common Lisp (and most | Lisp-family languages) doesn't have a standard interface to the code | walker, so you can't depend on that to remove them. I think macroexpansion sees the code qua code, so if you submit something for macroexpansion, you must remove the comments. I also need to clarify what I meant by "codewalker". I assume that in an editing setting, a different kind of code walker is needed than in a compilation setting, and that never the twain shall meet. in essence, I see editing and compiling code as very different tasks. e.g., during editing whitespace means a lot, during compiling it means nothing. in fact, during editing, a whole lot of issues come up that don't in compiling. another example is the #+ and #- reader macros. they must be retained in an edited function. I think comments are just a special case of the many differing needs, and that we delude ourselves if we think that executing directly from an editable form of the code is going to be much simpler than reading forms from a file. #\Erik -- 1,3,7-trimethylxanthine -- a basic ingredient in quality software.