attempt at humor:Okay so, would you rather your beloved great aunt's pacemaker fail because the software in it was written in C, and there's a use-after-free memory error, or because the software in it was written in JavaScript, and because someone used `==` instead of `===` a boolean that should have been `false` is `true`?
> they do it using either a parallel functional language or a parallel library in modern C++.
IMO this is a weakness not a strength.
The approach of Fleury (low level C, no lib), makes his articles a lot more valuable for understanding fundamentals.
My understanding is that Zig's incremental compilation will work on a much more granular level (i.e. functions, etc), so, for example, change one function and only that function (and its dependencies) will get recompiled/relinked (there's some linker trickery involved to avoid needing to relink everything IIUC).
This is great. It really showcases zig's dedication to quality, IMO.
I wish they took the time to communicate the intricacies of their toolchain.
Some things I think are remarkable:
Contrary to Rust, zig allows to cross-compile to MacOS. I think this implies that zig needed to build a custom linker!
Regarding libc:
- On Linux libc is not required because zig is using syscalls directly
- On MacOS libc is required because of the lack of stable abi
- On Windows libc is not required because zig links to windows kernel dll.
To my understanding, this implies that a compiled zig program will work across all linux distributions!
For C integration, I'm not knowledgeable enough to fully appreciate the work being done. but the fact that the cross-compiling also works out-of-box is mind-blowing to me.
This is great. It really showcases zig's dedication to quality, IMO.
I wish they took the time to communicate the intricacies of their toolchain.
Some things I think are remarkable:
Contrary to Rust, zig allows to cross-compile to MacOS. I think this implies that zig needed to build a custom linker!
Regarding libc:
- On Linux libc is not required because zig is using syscalls directly
- On MacOS libc is required because of the lack of stable abi
- On Windows libc is not required because zig links to windows kernel dll.
To my understanding, this implies that a compiled zig program will work across all linux distributions!
For C integration, I'm not knowledgeable enough to fully appreciate the work being done.
but the fact that the cross-compiling also works out-of-box is mind-blowing to me.