Comments, on comments

On comments in programming languages: I am pretty well convinced that the "ignore from special symbol to end of line" scheme, like C++'s "//" comments, is pretty much the way to go, at least for languages where people are writing with a good editor. You can highlight a simple regexp, you can discard them easily, and if you are at all clueful with your editor it's easy to comment out a long chunk of text.

Nested comments don't introduce hairy problems either, because it's easy to tell if a line has a comment-start on it.

The only minor difficulty is in commenting out medium-sized chunks of code -- you have to add the comment-start at the beginning of multiple lines, and the vast majority of people are not clueful enough with their editors to be able to do that easily. (Another case where Lisp did it right first; they had from-semicolon-to-end-of-line comments since the beginning I think.)

On APL Workspaces and LISP Packages: It's been pretty well established that the best programming model is, flat-ascii files of source code that get processed by a translator. If you want to watch execution as it happens, you probably want a specialized debugger. APL workspaces had funny modularity problems, not to mention crippling problems with portability.

There are now umpteen zillion tools for doing version-control of flat files, for searching flat files, and so forth. There is not much that one can really buy by having a non-ascii document format, that is worth giving up all this other infrastructure for.


Daniel F. Boyd / boyd@csgeeks.org
Last modified: Sat Jan 3 16:42:17 1998