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

Could you be so kind as to point out where you found this example please? I could not find it in the documentation link in parent post.


I/O examples such as that already exist on the Zig webpage, e.g. here:

https://ziglang.org/#A-fresh-take-on-error-handling

But the one I posted is from GitHub, where it has e.g:

https://github.com/ziglang/zig/blob/8139c5a516eaa217ed76acdf...

also:

https://github.com/ziglang/zig/blob/92d9cef07116da8639ac33b7...


Thanks! It would be good to get this as part of the official doc.

I can follow along with almost any language if there is enough examples I can piece together. I didn't think about scrolling through a bunch of GitHub pages. It isn't as convenient, but probably a better example of how to put together a full program as well as style.


Yeah, Zig needs a "Zig by example" (akin to the Go and Rust by example pages).




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: