I was fairly hyped up about Zig with various HN pieces I've read and wanted to check it out. After reading the status of strings in Zig in this post, and going on and reading this ludicrous exchange: [1], I wouldn't touch it with a 100-ft pole.<p>Half of the brokage of C is in the string handling (safety aside), and this is what passes for a 'better C' candidate in 2021?<p>And don't get me started on their discussion on Unicode support. It's like some bizarro alternative universe, where ASCII or a bag of bytes is good enough...<p>[1] <a href="https://github.com/ziglang/zig/issues/234" rel="nofollow">https://github.com/ziglang/zig/issues/234</a>
Copied from my reply on Lobsters (<a href="https://zserge.com/posts/better-c-benchmark/" rel="nofollow">https://zserge.com/posts/better-c-benchmark/</a>)<p>---<p>For what it's worth, we do understand that the lack of stdlib documentation is a problem. Before I expand on that, here's the current "workarounds" to be immediately productive:<p><a href="https://ziglearn.org" rel="nofollow">https://ziglearn.org</a> is a structured introduction to Zig that covers an introduction to Zig that is very friendly to newcomers. Chapter 2 in particular helps solving common problems and showcases some parts of the standard library while doing so.<p>On the Zig SHOWTIME YouTube channel there are a few videos that can help. One video in particular is about how to approach the Zig standard library today [1], while we wait for better docs.<p>Asking for help in a Zig community [2] is so easy it's like cheating, and it's also a door to knowing when new resources pop up.<p>So, what's up with the stdlib docs? We have an experimental build [3] and, as the name implies, they're incomplete and not considered good. Why are we not working on them? Because the docs are a JS interface to a bunch of metadata generated by the compiler during the build phase. We are currently transitioning to a self-hosted implementation [4] of the compiler and, until it's complete enough, we are stuck with the incomplete and buggy metadata that the current C++ compiler generates. I personally plan to get involved in the docs effort once the situation gets unblocked.<p>> I wish Zig had a better documentation to gain popularity before it becomes too niche and obscured.<p>Oh, don't worry about that :)<p>[1] <a href="https://www.youtube.com/watch?v=NQgju_2mX-8" rel="nofollow">https://www.youtube.com/watch?v=NQgju_2mX-8</a>
[2] <a href="https://github.com/ziglang/zig/wiki/Community" rel="nofollow">https://github.com/ziglang/zig/wiki/Community</a>
[3] <a href="https://ziglang.org/documentation/master/std/" rel="nofollow">https://ziglang.org/documentation/master/std/</a>
[4] <a href="https://kristoff.it/blog/zig-new-relationship-llvm/" rel="nofollow">https://kristoff.it/blog/zig-new-relationship-llvm/</a>