The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] Comments in early Unix systems
@ 2018-03-22 13:49 Doug McIlroy
  2018-03-22 14:29 ` Nemo
  2018-03-22 16:30 ` [TUHS] Literate Programming (was Comments in early Unix systems) arnold
  0 siblings, 2 replies; 5+ messages in thread
From: Doug McIlroy @ 2018-03-22 13:49 UTC (permalink / raw)


"I was told in school (in 1985) that if I was ever lucky enough to
have access to the unix source, I'd find there were no comments. The
reason, I was told at the time, was that comments would make the
source code useful, and selling software was something AT&T couldn't
do due to some consent decree."

I can't speak for SYS V, but no such idea was ever mentioned in
Research circles. Aside from copyright notices, the licensing folks
took no interest in comments. Within rsearch there was tacit
recognition of good coding style--Ken's cut-to-the-bone code was
universally admired. This cultural understanding did not extend
to comments. There was disparagement for the bad, but not honor
for the good. Whatever comments you find in the code were put
there at the author's whim.

My own commenting style is consistent within a project, but
wildly inconsistent across projects, and not well correlated
with my perception of the audience I might be writing for.
Why? I'm still groping for the answer.

For imoortant code, custom is to describe it in a separate
paper, which is of course not maintained in parallel with
the code. In fact, comments are often out of date, too.
Knuth offered the remedy of "literate programming", which
might help in academic circles. In business, probably not.
Yet think of the possibility of a "literate spec", where
the code grows organically with the understanding of what
has to be done.

Doug


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-03-22 17:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-22 13:49 [TUHS] Comments in early Unix systems Doug McIlroy
2018-03-22 14:29 ` Nemo
2018-03-22 16:30 ` [TUHS] Literate Programming (was Comments in early Unix systems) arnold
2018-03-22 16:48   ` Jon Steinhart
2018-03-22 17:07   ` Toby Thain

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).