3 ms·
Zig looks like a really interesting language. I've been keeping my eye on it, waiting excitedly for the 1.x milestone. Out of curiosity, what's the state of th
by lhorie 7y ago
Zig looks like a really interesting language. I've been keeping my eye on it, waiting excitedly for the 1.x milestone.
Out of curiosity, what's the state of the world regarding Zig's stdlib? While the base language docs seem like they're in a pretty good state, the stdlib is still largely undocumented. Is this because it's unstable? Or is the lack of docs there due to lack of time/resources? Would love to get some clarification. Thanks!
- rhodysurf 7y agoThe stdlib documentation is definitely the biggest sore spot of zig for me. It took me a little while to feel comfortable enough digging through the code to start finding what I could do with the stdlib. It slows me down programming using the language significantly.
- AndyKelley 7y agohttps://github.com/ziglang/zig/wiki/FAQ#where-is-the-documentation-for-the-zig-standard-library https://github.com/ziglang/zig/wiki/FAQ#where-is-the-documen...
- lhorie 7y agoYeah, I always check that. The part that says "There is no stdlib documentation yet, but it is planned for the next release" links to a 2015 github issue. That's why I was wondering if it's still a priority or if there were still high level concerns about stability/curation/etc preventing docs from being written.
- AndyKelley 7y agoIt's an unwillingness to implement documentation generation twice. Why do it in the c++ compiler when the goal is to become self-hosted? I think there's a good answer to this which is, "because people really, really need documentation." So I am kicking around ideas of how this can be done without too much duplicate effort.
- lhorie 7y agoI see. Do you think there would be value in having someone just manually writing some interim docs (perhaps as a wiki) until the time when it can be properly generated? This may seem like a weird place to draw experience from, but in my early days of programming, I've found the PHP docs extremely helpful largely thanks to community comments sections giving examples of how to do various things. Just some food for thought.
- AndyKelley 7y agoI think that would be problematic because the standard library is still very unstable. You can see from the release notes just how much changed from 0.4.0. A wiki page would be outdated right away. One of the tenets of my development process with Zig is "avoid local maximums". A wiki for std lib documentation is not the long term solution to the problem, and so I won't be investing any time into it. All my time is invested in the long term solution.
- jeremyjh 7y agoCouldn’t you say this about every single feature implemented in the C++ compiler?