March 05, 2022

On Saturday, 5 March 2022 at 17:09:22 UTC, max haughton wrote:

>

Basically pointless. The linkage of internal symbols has almost no relevance to a projects usability from C. You'd also be throwing away anything that requires name mangling, for zero real benefit.

If you want to expose a symbol to C then use extern(C). This is not hard to do.

Actually, we are saying the same thing. The only reason to use C linkage is to "expose" symbols (aka allowing it to call it with a known name) from C. This will allow your library to be used from C and from any language that can use C linkage.

March 05, 2022

On Saturday, 5 March 2022 at 20:48:45 UTC, rempas wrote:

>

On Saturday, 5 March 2022 at 17:09:22 UTC, max haughton wrote:

>

Basically pointless. The linkage of internal symbols has almost no relevance to a projects usability from C. You'd also be throwing away anything that requires name mangling, for zero real benefit.

If you want to expose a symbol to C then use extern(C). This is not hard to do.

Actually, we are saying the same thing. The only reason to use C linkage is to "expose" symbols (aka allowing it to call it with a known name) from C. This will allow your library to be used from C and from any language that can use C linkage.

Which is trivially done now, whereas making it the default with betterC means you lose a bunch of D features

1 2
Next ›   Last »