4 ms·
At this point, what about using Zig instead?
by ngrilly 6y ago
At this point, what about using Zig instead?
- dnautics 6y agoAside from it being not 1.0 yet, I think this is the right answer for the future.
- crispyalmond 6y agoOnce Zig hits 1.0 I'll have almost no need for C anymore. I like what I've experienced when developing with Zig, and I think it's neat.
- xiphias2 6y agoZig is not compatible with the existing C code base. Also it’s different enough from C that it needs extra training.
- dnautics 6y ago> Zig is not compatible with the existing C code base It's actually more compatible with the existing C code base than C is. If you're not familiar: https://andrewkelley.me/post/zig-cc-powerful-drop-in-replacement-gcc-clang.html https://andrewkelley.me/post/zig-cc-powerful-drop-in-replace... and an IRL use case: https://dev.to/kristoff/zig-makes-go-cross-compilation-just-work-29ho https://dev.to/kristoff/zig-makes-go-cross-compilation-just-...
- xiphias2 6y ago,, zig cc is not the main purpose of the Zig project’’ This doesn’t make me confident that it is well maintained. I”m more interested in how it compiles the Linux kernel, or GNU tools, or any complex C code (and how it performs)
- dnautics 6y agoseriously, are lua and cgo not complex enough for you? if you're worried about maintenance, it's pretty high priority, given that the overall strategy for zig seems like "embrace, extend, and extinguish", with this being a key driver of the "extend" fork of the strategy. If that's not enough for you, it's my plan to later this year put up a bounty to for someone to demonstrate compilation of the BEAM virtual machine with zig cc. That's "basically an operating system".
- xiphias2 6y agoI wrote ,, Zig is not compatible with the existing C code base''. If it doesn't compile Linux, it's a non-starter as an extended version of a C compiler.
- dnautics 5y agoby your criterion clang was not "compatible with the existing C code base" for many years, and therefore a "non-starter". History would have proven you wrong.