Should C linkage (aka "extern (C)") be the default when using "betterC"?

meta meta at gmail.com
Sat Mar 5 12:34:20 UTC 2022


On Saturday, 5 March 2022 at 11:34:34 UTC, rikki cattermole wrote:
>
> On 06/03/2022 12:23 AM, rempas wrote:
>> Am I the only one that things this way? If I'm not wrong, 
>> other than some (mostly runtime) advantages that "betterC" 
>> offers, It is also necessary when someone wants to allow their 
>> library to generate binding for other languages.
>
> Its certainly a more unique way of thinking.
>
> After all, why would you lose function overloading for no good 
> reason?
>
> Not to mention, now if you build your code as -betterC, but use 
> it in a non-betterC program, boom linker errors due to 
> mismatching mangling.

I misread rikki's comment

Loosing function overloading is indeed problematic, so it's not a 
so good idea..


More information about the Digitalmars-d mailing list