Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There is a simpler version for zig.

    pub fn main() !void {
        std.debug.print("Hello, World!\n", .{});
    }
The only difference is this writes to stderr and does not fail (and explicitly says it is meant for debug), while their example writes to stdout. In zig if you want to write to stdout you need to explicitly pick the std and handle all the details (like error handling).

He gave the possible worst example, this article is nonsense.



Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: