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

Adam D Ruppe destructionator at gmail.com
Sat Mar 5 12:54:44 UTC 2022


On Saturday, 5 March 2022 at 12:32:46 UTC, meta wrote:
> There is if you want your code to be used within a C project

I said you use it for the bindings. You should only extern(C) the 
necessary interface, not the whole thing.

Even in C, the recommendation is to make things `static` since 
not everything should be extern(C) even there! lol

> Better C is very valuable, Rust has to go throught a lot just 
> to provide similar functionality we get here

betterC has nothing to do with C interop.


More information about the Digitalmars-d mailing list