News for hackers. Stuff that matters.
Re:D as a C Replacement by jcelerier on Wednesday July 03, 2019 @12:48PM (#20346087)
> Almost all languages allow you to link to a C module.

no, almost all languages allow you to call into your operating system's native dynamic library format.

That this binary was originally built with C, C++ in extern "C", fortran, ADA, D -betterC, Pascal... does not matter at all.

C just happens to be the most popular language for building those...

Re:D as a C Replacement by rramadass on Wednesday July 03, 2019 @10:43PM (#20351063)
>That this binary was originally built with C, C++ in extern "C", fortran, ADA, D -betterC, Pascal... does not matter at all.

Not quite; the point of using the phrase "link to a C module" was to point out that all of them conform to the applicable "C ABI" for a platform and therein lies C's strength as a "glue" language.

Re:D as a C Replacement by jcelerier on Thursday July 04, 2019 @02:13AM (#20351991)
C does not have an ABI in itself, it just uses the conventions of its host system.

e.g. how function calls are done, how names are mangled (for instance on macOS all function names are prepended with an underscore and not on 64-bit windows nor linux...), etc... none of this is defined in the C standard, and it varies across platforms.

Re:D as a C Replacement by rramadass on Thursday July 04, 2019 @02:42AM (#20352141)
>the applicable "C ABI" for a platform

Was the phrase i used. It is well known that the C standard does not define an ABI but a processor arch+OS i.e. platform defines it. Over time that defined for C binaries on a platform have become the "de facto" standard and almost all other language run-times hew to it as needed.