9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Douglas A. Gwyn" <dagwyn@home.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Installing the updates
Date: Wed,  2 Aug 2000 09:53:55 +0000	[thread overview]
Message-ID: <3987ED0B.CFFF496C@home.com> (raw)
In-Reply-To: <200008011335.JAA17292@cse.psu.edu>

rob pike wrote:
> To meet that goal, we had to break with the ANSI include rules.

I don't see why.  The C standard does *not* say that
you *must* include any header multiple times; you
can enforce Plan9 programming discipline regardless
of whether headers have internal idempotency locks.
The presence or absence of such locks has no effect
on Plan9-style applications that #include every header
needed, once apiece in whatever the proper order is.

Indeed, the Plan9 header discipline imposes an
interdepency ordering upon the system headers,
such that e.g. <libsec.h> and <libmp.h> cannot
both define something that the other header needs,
which might otherwise be a natural thing to do.

It is nice that Plan9 programs don't individually
use #ifdefs and config, but really the use of
centrally-defined types and macros in a common
environment avoids such stuff.  In effect, the
differences are factored out to a global level.

The reason for remaining #ifdefs in many actual
applications is that they have to work in many
environments that differ in much more radical ways
than any two instances of Plan9.  There are ways
of factoring out the differences, and I generally
recommend them in the design phase, but most
applications are created by people who don't know
(or care) about all the ways other environments
differ from the one where they do their development,
and some other poor sap later on is stuck with
porting their code.  Repackaging the whole thing
might not be feasible, so patching places where
problems crop up using #ifdefs is expedient.
(More work for the *next* poor sap.)  It would be
nice if everybody had the experience and foresight
to design his code properly in the first place,
with all system dependencies isolated modularly,
but in the real world that seldom seems to happen.


  parent reply	other threads:[~2000-08-02  9:53 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-01 13:35 rob pike
2000-08-01 18:34 ` Greg Hudson
2000-08-02  9:53 ` Douglas A. Gwyn [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-08-02  9:47 forsyth
2000-08-02  9:52 ` Boyd Roberts
2000-08-01 17:06 Russ Cox
2000-08-02  8:32 ` Bruce G. Stewart
2000-08-01 16:27 rob pike
2000-08-02 10:53 ` Ralph Corderoy
2000-08-01 16:26 rob pike
2000-08-02 21:49 ` Steve Simon
2000-08-01 13:06 rob pike
2000-08-01 13:10 ` Lucio De Re
2000-08-01 12:55 rob pike
2000-08-02  9:39 ` Douglas A. Gwyn
2000-08-01  6:04 Russ Cox
2000-08-01  5:42 Russ Cox
2000-07-31 17:09 Russ Cox
2000-07-31 15:57 jmk
2000-07-31 15:15 rob pike
2000-08-01  8:53 ` Douglas A. Gwyn
2000-08-01 12:12   ` Howard Trickey
2000-08-02  9:11     ` Douglas A. Gwyn
2000-08-01 14:31   ` Ralph Corderoy
2000-08-01 16:03     ` Greg Hudson
2000-08-01 16:32       ` James A. Robinson
2000-08-01 17:05         ` James A. Robinson
2000-08-02  9:39       ` Douglas A. Gwyn
2000-08-02  9:11     ` Douglas A. Gwyn
2000-08-03 14:51     ` ozan s. yigit
     [not found] <djhender@telusplanet.net>
2000-07-31 14:53 ` Doug Henderson
2000-07-31 17:38   ` Scott Schwartz
2000-07-31 20:10     ` Steve Simon

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=3987ED0B.CFFF496C@home.com \
    --to=dagwyn@home.com \
    --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).