The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Paul Winalski <paul.winalski@gmail.com>
To: "Perry E. Metzger" <perry@piermont.com>
Cc: tuhs@minnie.tuhs.org
Subject: Re: [TUHS] About Unix header files
Date: Wed, 22 Aug 2018 11:29:40 -0400	[thread overview]
Message-ID: <CABH=_VRaKv-yn8VFXbxuUGN8=KeM-=_tNtBaoQGFQZsDesBjjA@mail.gmail.com> (raw)
In-Reply-To: <20180822094452.73ca043f@jabberwock.cb.piermont.com>

On 8/22/18, Perry E. Metzger <perry@piermont.com> wrote:
>
> To my knowledge, object file formats still don't have information
> about type signatures, and linkers still don't care about types. This
> is actually a problem. It would probably prevent a lot of errors if
> those things changed.

For a linker to enforce (or warn about) type and call signature
matching, it would have to know the type and call semantics of each
particular language, and each particular compiler's switch options
that allow the programmer to bend the language rules.  Not impossible,
but a difficult and cumbersome problem, particularly as language and
compiler implementation semantics vary over time.

C++ and other strongly-typed languages typically hack around the
problem using name decoration.  Not elegant, but effective.

Has anyone experimented with building Unix using C++, to take
advantage of strong typing?  My guess is no--it would be a Herculean
task likely to introduce more bugs than it would fix.

-Paul W.

  reply	other threads:[~2018-08-22 15:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-21  4:55 Caipenghui
2018-08-21  6:00 ` Warren Toomey
2018-08-21 21:37 ` Cornelius Keck
2018-08-22  4:25   ` [TUHS] Cornelius Keck Caipenghui
2018-08-22 13:44   ` [TUHS] About Unix header files Perry E. Metzger
2018-08-22 15:29     ` Paul Winalski [this message]
2018-08-22 15:36       ` Caipenghui
2018-08-22 15:46       ` Perry E. Metzger
2018-08-22 15:52         ` G. Branden Robinson
2018-08-22 15:56         ` Paul Winalski
2018-08-22 16:04     ` Dan Cross
2018-08-23  2:23       ` George Michaelson
2018-08-22 22:00 Doug McIlroy
2018-08-22 23:05 ` Erik E. Fair

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='CABH=_VRaKv-yn8VFXbxuUGN8=KeM-=_tNtBaoQGFQZsDesBjjA@mail.gmail.com' \
    --to=paul.winalski@gmail.com \
    --cc=perry@piermont.com \
    --cc=tuhs@minnie.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).