Re: Reason behind semicolumns (i.e. "inline comments") in system output?
Richard M Kreuter via Sbcl-help <[email protected]>
| Newsgroups | gmane.lisp.steel-bank.general |
|---|---|
| Message-ID | <[email protected]> |
Jan J. via Sbcl-help <[email protected]> wrote: > Is there any particular reason as to why some REPL output has > semicolumns prefixing it, as though it is trying to comment it out? I believe it's an informal custom. ANSI requires whatever messages COMPILE-FILE and LOAD print when VERBOSE is true to be in the form of a comment, and SLIME implements comment formatting. but I doubt the custom is very consistently observed. > I am curious about the source/history of this convention. I don't know exactly, but here's some "just so" storytelling. - Lisp development is canonically an interaction with a long-running session. A minimal interactive environment would have one channel for input from the user and one channel for output to the user. In such an environment, if there's ever a need to transmit information other than a user program's "primary" output, prefixing any "non-primary" output (e.g., non-interactive error and warning reports, diagnostics, timings, tracing, progress reports, GC notices, etc.) with a semicolon makes it easier for a user to distinguish things. - The custom might remain useful even where it's not absolutely necessary. For example, even if "primary" and "non-primary" outputs could technically go to distinct windows, users might like them co-mingled to make the sequential execution order clear. - It's pretty ordinary to write Lisp programs that process programs. A "processor" and "processee" might each have "primary" output. For example, a compiler might have something to say about code in a file, and the code in the file might have its own things to say during compilation. If a processor shares its output stream with its processee, having the processor prefix its output with a semicolon (or just differently many semicolons than its processee) makes it easier for a user to discern origins. Regards, Richard