logoalt Hacker News

dnautics12/08/20251 replyview on HN

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.


Replies

sumalamana12/08/2025

Why 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?

show 2 replies