built in import c header files

FeepingCreature feepingcreature at gmail.com
Mon Apr 19 10:10:33 UTC 2021


On Monday, 19 April 2021 at 09:09:21 UTC, evilrat wrote:
> On Monday, 19 April 2021 at 06:51:54 UTC, FeepingCreature wrote:
>> I can wholeheartedly recommend any language do this. It 
>> unlocks a lot of value and removes a lot of manual work.
>
> Yeah, just until it fails to convert something and blocks 
> compilation, where no manual fixes is possible or not even 
> allowed by design.

Yeah I think it differs between using it for system headers and 
using it for library headers, that are probably going to be 
relatively standardized across distributions and compiler 
versions.

That said, at least the p much worst thing that can happen is a 
compiler error. With manual headers, you can end up on a weird 
system where the layout of a header struct is different, or a 
function is implemented as a header macro that calls a different 
function, and then you get linker errors or miscompilation. If 
anything, the headers are probably closer to the "source of 
truth" about the API.


More information about the Digitalmars-d mailing list