[comp.lang.c] "//" for comments

karl@haddock.ISC.COM (Karl Heuer) (01/09/88)

In article <511@cresswell.quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes:
>BCPL has end-of-line comments introduced by "//".  I wonder whether the
>reintroduction of this into C++ is a coincidence?

I don't know (but I'll forward this article and all followups to the C++
newsgroup, so Bjarne can answer it if he wants to).

However, I can tell you that I independently came up with the same idea (as
one of many "proposed enhancements to C", most of which I recognized as being
more properly part of a "wish list for D") several years ago, before I knew
that BCPL and C++ did it.  I considered it "obvious" that a comment-to-EOL
symbol was desired, since people were putting redundant markers (often " * ")
on the interior lines of block comments anyway; and somehow, "//" seemed like
the most natural notation to use, given the existing C syntax.  (My second
choice would be something beginning with "#".)

Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint