Hacker News new | ask | show | jobs
by actionfromafar 849 days ago
Zig has the especially interesting feature that it can compile C code.
1 comments

That is more a property of shipping the whole LLVM/Clang package with the zig compiler than anything, though.
Whatever the mechanism, it has big implications for how Zig will be used in practice.
A mechanism available to any language that feels like shipping clang.

It is also how Swift gets its C and Objective-C interop, and will have its C++ interop as well.

Or how the Java Panama project extracts header file information for native interop.