9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Douglas A. Gwyn" <gwyn@arl.army.mil>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] ugrading edition 2 graphics to edition 3
Date: Mon,  7 Aug 2000 08:44:26 +0000	[thread overview]
Message-ID: <398B1435.EF80811D@arl.army.mil> (raw)
In-Reply-To: <009101bffe36$46c26fa0$02a7b6c3@lucid.proweb.net>

Matt wrote:
> Take out one file and one bit of script down the list suddenly falls apart
> because it was relying on an include higher up etc.

I'm not sure what you mean, but my guess is that you're saying
that an #include was removed from a source file after all references
to symbols documented as being defined by that header were no
longer referenced in that source file.

> I'm sure this must be true of a big C project too.

Not necessarily.  The last really big C project I was involved in
(MUVES) had everything arranged as "packages", each with its API
defined by a single header, e.g. "Mm.h" for everything in the
Memory-management package.  (All symbols in Mm.h begin with "Mm"
in order to avoid collision with any other package.)  It happened
that the Mm package needed to use some facilities from the Dq
(Doubly-linked queue) package and vice versa.  I forget whether
the "Dq.h" header needed to #include "Mm.h" and/or vice versa,
but if they had, there would be no problem (due to idempotency
locks in each header).  The key to the problem I think you were
mentioning is that *any* user of anything named Dq... was required
to #include "Dq.h" and similarly for any user of Mm...  Removing
the API for a package that became unused through edits to a source
file would have no effect on the remaining package headers.

Just as with the Plan 9 header discipline, if you don't follow
the discipline consistently, it can cause problems.  The rules
we used for the MUVES source were very easy to remember and follow,
and they never caused us any problems.  (Well, there was one
related problem, but it wasn't the fault of the header rules as
such.  MUVES used "unit testing" in its build procedure, to
validate each package's object modules before putting them into
the project library.  The unit testing linked the package test
program with the under-test package modules and the library.  When
first installing on a new platform, Dq and Mm each needed the
other package to have been already put into the library before
the test could be linked.  We devised a simple kludge to work
around this mutual dependency problem.)

Note: I haven't been arguing that the Plan 9 header discipline
is wrong, but rather that not all experiences with headers
including other headers have been negative.  Like many things
in life, nested inclusion itself is not a problem, but rather
how it is *used*.


  reply	other threads:[~2000-08-07  8:44 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-03 20:19 geoff
2000-08-04 16:19 ` Douglas A. Gwyn
2000-08-04 17:06   ` Matt
2000-08-07  8:44     ` Douglas A. Gwyn [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-08-05  2:27 Anthony Sorace
2000-08-05  2:18 geoff
2000-08-04 17:02 nigel
2000-08-07  8:44 ` Douglas A. Gwyn
2000-08-04  8:25 forsyth
2000-08-03 23:43 kim kubik
2000-08-04  9:12 ` Boyd Roberts
2000-08-04 14:19   ` Andy Newman
2000-08-04 14:37     ` Boyd Roberts
     [not found]       ` <20000805004518.A42947@juju.bsn>
     [not found]         ` <022101bffe66$90ac6640$03c684c3@psychobasketcase.org>
     [not found]           ` <20000805085453.A46136@juju.bsn>
2000-08-04 23:26             ` Boyd Roberts
2000-08-07  8:46               ` Alex Danilo
2000-08-07 13:41                 ` Andy Newman
2000-08-07 20:45                 ` Boyd Roberts
2000-08-03 20:40 forsyth
2000-08-03 19:13 dhog
2000-08-02 20:33 Russ Cox
2000-08-02 16:53 Anthony Sorace
2000-08-02 14:45 rob pike
2000-08-03  8:20 ` Boyd Roberts
2000-08-03  8:44   ` Doug Henderson
2000-08-03  8:54     ` Boyd Roberts
     [not found]       ` <boyd@noos.fr>
2000-09-11 15:41         ` Tom Duff
2000-08-02 13:23 Doug Henderson

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=398B1435.EF80811D@arl.army.mil \
    --to=gwyn@arl.army.mil \
    --cc=9fans@cse.psu.edu \
    /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).