News for hackers. Stuff that matters.
Re:Zig's Incremental Compilation Internals by tester756 on Tuesday July 28, 2026 @05:17PM (#49090021)
>While most hello worlds do not check that the message was printed

Should they?

Re:Zig's Incremental Compilation Internals by phire on Wednesday July 29, 2026 @10:22PM (#49105460)
Really depends on what a hello world is meant to be a simplification of.

If hello world is meant to be a simplification of printing large amounts of text to a buffered standard out? Then yes, it probably should be checking errors.

If hello world is meant to be a simplification of low-volume debug logging to prove that code was reached (aka, printf debugging), then the simple alternative hello world using std.debug.print is what you want.

For such debug prints, you don't want any buffering, you don't want it mixed in with stdout (despite the name, stderr is not just for error messages), and you don't really need to check for errors. And std.debug.print does not return errors.