The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Doug McIlroy <doug@cs.dartmouth.edu>
To: tuhs@tuhs.org
Subject: Re: [TUHS] C comments
Date: Fri, 07 Dec 2018 22:54:17 -0500	[thread overview]
Message-ID: <201812080354.wB83sHQI000641@tahoe.cs.Dartmouth.EDU> (raw)

Very little in language design is so contentious as comment conventions.

C borrowed the PL/I convention, which had the virtue of being useful
for both in-line and interlinear comments, and did not necessitate
marking every line of a long comment. Nobody in the Unix lab had
had much experience with the convention, despite having worked on
Multics for which PL/I was the implementation language.

And how did PL/I get the convention?  It was proposed by Paul
Rogoway at the first NPL (as it was then called) design-committee
meeting that I attended. Apparently the topic had been debated
for some while before and people were tired of the subject. Paul
was more firmly committed to his new idea than others were to
old options, so it carried more or less by default. Besides, there
was a much more interesting topic on the agenda. Between the
previous meeting and that one, George Radin had revamped the
entire NPL proposal from mainly Fortran-like syntax to Algol-like.
That was heady enough stuff to divert people's attention from
comments.

As for inexperiece. The comment conventions of previous
languages had not fostered the practice of commenting out
code. So that idea, which is the main impetus for nesting
comments, was not in anybody's mind at the time. Had it
been, nesting might well have carried the day. It probably could
have been changed before 1980, but thereafter there were
too many C compilers. Then standards introduced even more
conservatism. Perhaps Ken can remember whether the notion
was ever seriously considered.

Doug

                 reply	other threads:[~2018-12-08  3:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201812080354.wB83sHQI000641@tahoe.cs.Dartmouth.EDU \
    --to=doug@cs.dartmouth.edu \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).