←back to thread

Zig is hard but worth it

(ratfactor.com)
401 points signa11 | 2 comments | | HN request time: 0.469s | source
Show context
thadt ◴[] No.36150211[source]
> Crucially, there is basically no documentation for the standard library except for the source code itself.

From the viewpoint of someone learning about a new language, I find the accessibility of the standard libraries goes a long way toward helping me understand how things fit together. It is a first stop to see how experts in the language use it. Browsing through the standard libraries of languages like Zig, Go, and Python - they're usually well-documented and readable enough to be a tutorial, even before you've dug into learning it. Others (Rust, C++) are a bit more, ah, technical for the novice.

replies(3): >>36150393 #>>36150476 #>>36150587 #
1. Vecr ◴[] No.36150393[source]
Rust has the standard library documentation at https://doc.rust-lang.org/std/ or on your local computer, if there's really nothing like that for Zig I think that's a problem. Are you sure there's no `info zig` or something like that?
replies(1): >>36150816 #
2. sciolistse ◴[] No.36150816[source]
There is https://ziglang.org/documentation/master/std but it's not always been correct, and the descriptions are lacking. The new one should hopefully fix that.

Personally I've never had an issue reading through the source for zig std, and if your editor supports it you can just 'go to implementation' on most things. Hopefully the code remains relatively readable since I find it preferable to see the actual code + some basic tests rather than trying to navigate those documentation sites.