Hi all. Experienced dev here, I thought I’d do a quick post-mortem after shipping my first real Zig project.
-
I am deeply inspired by Ghostty/Mitchell and decide to try Zig for my next project. I use 0.15.2 on macOS with an assist from mise.
-
OMG compilation is fast! Love love love it. After doing a similar project in Rust I can’t go back. The binaries are tiny as well, I am hooked.
-
LLMs are good at zig. IMO the docs need a colossal amount of work and this is made worse by the strata of ancient pages, blog posts, and dead code on github. It’s hard to find definitive docs. Docs site seems slow. Personally I find this odd since docs are easy to improve with an LLM. I accept this though, no big deal.
-
It’s wonderful to see that LLMs will happily scan
stdand make good decisions. I pair with Codex and use Claude for reviews, which works pretty well. -
Best bug so far - Codex thinks all my tests are green, but it turns out there are no imports (and no output). Claude catches it.
-
I can’t find lots of essential things that I looked for in std. No csv. No regex. Unicode display width. argv. Some libs are on github but look abandoned or are self-described toys. Again, not a showstopper. I know how to build this stuff and it’s not out of reach. Looking forward to juicy main.
-
Enjoying the language design, for the most part. No surprises, feels familiar, like slipping into new shoes that are the right size. I like structs, unwrapping optionals seems straightforward. try/defer are natural and fun after writing lots of golang.
-
I am quickly learning that the hard stuff is easy - compilation speed, binary size, fast iteration, code hygiene with fmt and friends. Likewise the easy stuff is hard - strings, printing, filter/map/sort/sum. Formatting numbers with delims.
-
I wrestle endlessly with certain tasks, like accepting input from either stdin or a file. Or how to surface error strings from ARGV processing. The lack of
message:for errors is painful. I largely give up on memoization, which is a powerful pattern. -
Now that I’ve written a bit more Zig I feel some minor frustations with the language. Variable naming collisions are maddening and occupy too much brainspace. Still don’t quite understand all the nuances of const vs. var, despite my lengthy experience with similar constructs across many languages. Eventually I tuned out and let the LLM handle it. I miss default arguments and named params. Why can’t I globally import
std? Not crazy about break :blk or the errdefer pattern, but I get it. Where are my precious lambdas? Sometimes I feel like I’m typing too much in Zed. -
LLMs work with great confidence when tests are co-located with source. My regex implementation has got to be one of the most heavily tested things I’ve ever created. Feels amazing, and still so fast to iterate. Speed trumps many other considerations.
-
I release my cli app and people love it. Easy to distribute with goreleaser. Huge success!
-
Aside - Not a great experience in r/Zig. Very quiet in there. I spent a few days polishing up my hard won libraries (csv, unicode display width, natsort) and posted about it. For some reason they banned me for that, I doubt I will return.
Thanks all, looking forward to doing more with the language!