4 ms·
there was a recent interview where andrew suggested if i understood correctly: the future path of zig is to make all compilations (successful or not) produce an
by dnautics 11mo ago
there was a recent interview where andrew suggested if i understood correctly: the future path of zig is to make all compilations (successful or not) produce an executable. if theres something egregious like a syntax or type error, the produced artifact just prints the error and returns nonzero. for a "unused parameter", the compiler produces the artifact you expect, but returns nonzero (so it gets caught by CI for example.
- sumalamana 11mo agoWhy would the compiler do that, instead of just printing the error at compile-time and exiting with a non-zero value? What is the benefit?
- j16sdiz 11mo agoIt is more a debug/development feature. You can try out some idea without fixing the whole code base.
- dnautics 11mo agoif you have a syntax error in file A, and file B is just peachy keen, you can keep compiling file B instead of stopping the world. Then the next time you compile, you have already cached the result of file B compilation.