[TUHS] About Unix header files

Paul Winalski paul.winalski at gmail.com
Thu Aug 23 01:29:40 AEST 2018


On 8/22/18, Perry E. Metzger <perry at 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.



More information about the TUHS mailing list