3 ms·
What's replacing C? I can see languages like go/rust/crystal replacing C++ for application development, but what's producing stable binaries that other language
by flukus 10y ago
What's replacing C? I can see languages like go/rust/crystal replacing C++ for application development, but what's producing stable binaries that other languages can consume in the same way the do C ones?
- kbenson 10y agoRust can produce C compatible libraries. Go apparently can too. I suspect a little googling would show me that Nim and D can as well. I'm sure there are at least a few more.
- majewsky 10y agoGo can use C libraries, but AFAIK it cannot be compiled into a shared library to be used by a C program. Go needs control of the program flow to orchestrate its runtime (esp. the GC). Nim can definitely produce C-compatible libraries, seeing how it compiles to C itself.
- mixedCase 10y ago>but AFAIK it cannot be compiled into a shared library to be used by a C program. Go 1.5 added support for this.
- flukus 10y agoI didn't know rust could, I just checked it out. I didn't realize rust was that low level.
- petre 10y agoInterfacing D to C and C++ is failry easy as it was built with excellent C/C++ interop in mind. It's also compatible with C ABI and has limited compatibility with C++ ABI.