2 ms·
> To interop with C you either need a C-compatible compiler (C++, Obj-C, and now D, Zig) or a human writing interop code by hand. It's the other way around - C
by lelanthran 5y ago
> To interop with C you either need a C-compatible compiler (C++, Obj-C, and now D, Zig) or a human writing interop code by hand.
It's the other way around - C is so easy to interop to that you don't even need to do anything. Modules, on the other hand, or such an effective lock-in that you can't reasonably automate the interop with it.
With a C header, all I need to do is run a single command that generates interfaces based on it for almost every language there is. Try that with any module-based system.