The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: rminnich@gmail.com (ron minnich)
Subject: [TUHS] Mac OS X is Unix
Date: Wed, 04 Jan 2017 00:12:04 +0000	[thread overview]
Message-ID: <CAP6exYKKM9Bicy2+Gm9ZLij6mA7ByWYvrd7tFayvY=3FHErJUg@mail.gmail.com> (raw)
In-Reply-To: <9FC94387-9453-4BCF-8FBE-37193D70E512@tfeb.org>

On Tue, Jan 3, 2017 at 3:39 PM Tim Bradshaw <tfb at tfeb.org> wrote:

> I think you can do so only if every language processor you ever expect to
> deal with your code is lexically-compatible: you *can't* do so if the lexer
> will puke: you need some frontend which will prevent the lexer ever seeing
> the toxin, and that thing is what Lisp would call read-time
> conditionalization.  Plan 9 and Go both avoid this problem by being
> single-implementation or nearly-single-implementation systems: many things
> are easier with that assumption.
>
>
>
Well, if by single-implementation, you mean single-compiler, I have a
counter example: Harvey is Plan 9 with just enough changed to be C11
compliant. All of userland, libraries, and kernel build and boot with gcc
4, 5,6 and clang 3.5, 3.6, and 3.8. Harvey builds and boots on amd64 and
riscv. We've adhered as much as we can to the coding style of Plan 9 and
we've seen the benefits. Probably the only major change was removal of
anonymous struct members, and that actually improved the code as it
uncovered some long-standing driver bugs.

In contrast, it's very hard to build portable code that uses extensive
ifdefs and 'modern' tools like libtool today. Just the other day I had a
 build failure because something needed autotools x.6.61 and I only had
x.y.60. Portable seems to now mean 'builds on ubuntu AND Fedora!' and even
that's rare.

The portability principles used in Plan 9 work just fine with 'modern'
compilers. The cpp abuse we see in so much code today seems completely
unnecessary to me. C code written with #ifdefs and libtool is far less
portable than it might be.

ron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20170104/8eb183c4/attachment.html>


  reply	other threads:[~2017-01-04  0:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-03 20:19 Doug McIlroy
2017-01-03 21:05 ` Charles Anthony
2017-01-03 21:33   ` [TUHS] When was #if introduced in C? (was: Re: Mac OS X is Unix) Michael Kjörling
2017-01-03 21:53     ` Robert Swierczek
2017-01-03 21:57       ` Clem Cole
2017-01-03 21:56     ` Clem Cole
2017-01-03 21:35 ` [TUHS] Mac OS X is Unix Clem Cole
2017-01-03 22:10   ` Lyndon Nerenberg
2017-01-03 21:39 ` Lyndon Nerenberg
2017-01-03 22:12   ` ron minnich
2017-01-03 23:39     ` Tim Bradshaw
2017-01-04  0:12       ` ron minnich [this message]
2017-01-04  9:11         ` Tim Bradshaw
2017-01-04 10:04           ` Álvaro Jurado
2017-01-04  0:13 ` Steve Johnson
2017-01-04  3:50 ` Dan Cross
2017-01-04 12:26   ` Tim Bradshaw
2017-01-04 13:49     ` Random832
2017-01-04 15:02     ` Dan Cross
2017-01-04 17:14       ` tfb

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='CAP6exYKKM9Bicy2+Gm9ZLij6mA7ByWYvrd7tFayvY=3FHErJUg@mail.gmail.com' \
    --to=rminnich@gmail.com \
    /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).