[TUHS] About Unix header files

Caipenghui Caipenghui_c at 163.com
Thu Aug 23 01:36:13 AEST 2018


On August 22, 2018 11:29:40 PM GMT+08:00, Paul Winalski 
< paul.winalski at gmail.com> wrote:
> 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.

Well, I agree with you that this may be achieved in the future.




More information about the TUHS mailing list