If you want a good source of zig learning material interactive and by examples please check out ziglings: https://codeberg.org/ziglings
It's writen and tested by humans, which is essential for learning purposes. It's listed in the official zig website, by the way.
This project is always up to date to the latest zig release.
As a Rust user, AI has put Rust easily in the hands of developers who were previously intimidated by it. I've learned a ton about Rust simply by fiddling with LLMs and asking questions to other Rust devs who don't really care whether AI is used.
As soon as you give into the mob rule, your existence is going to depend entirely on the ideology of the crowd and you lose the ability to adapt and remain competitive. ex) "modern audience" games from large studios.
nowadays before reading or buying any book, we need to extensively investigate the author, the author name is now more important than ever, i think whenever a book is shared, the author need to me highlighted
I mean not really. You read a paragraph or two and notice the quality of the text, start getting suspicious and continue two or three paragraphs more, notice some very basic inconsistencies/incoherence, realize it's AI-written and ctrl+w the tab (or put back the book in the shelf) and move on with your life.
If there is no samples of the book, I'd hesitate to even consider buying it, just so you can actually sample the text. Very easy in bookstores luckily, so not a huge problem in the end.
i think for consumer protection, AI products need to be flagged as AI products, clearly labelled as AI produced or assisted , of course for free goods the burden is on us, but for anything we pay for, I hope we get this protection
- Learning Zig by Karl Seguin: https://www.openmymind.net/learning_zig/
- Free project-based online book Introduction to Zig by Pedro Park: https://pedropark99.github.io/zig-book.
- Ziglings, almost working programs you need to fix: https://codeberg.org/ziglings/exercises
Examples target Zig 0.14.
Been some significant changes since then, not least to printing and formatting (see writergate).For now, I have a basic grasp of C#, a little Python, a little C++, and a little TypeScript. I also know Java to some extent, but honestly, what I mostly build is CRUD app assembly. To go deeper, I think I need to dig into a systems language. But I'm not sure whether to invest in Zig or Rust.
So unless you work in another domain where you do a lot of low level programming, then every time you drop down you will be out of practice. This favors using a simpler low level language, with low friction for integration. Rust and C++ don't handle being used infrequently, but C with it's simpler standard library and syntax fits this nicely. But it doesn't have things you expect for a modern programming language, and it is also has a lot of dangerous footguns that are easy to forget if you are out of practice
In comes Zig. It's low level, comes with it's own toolchain that makes it pleasant to work with, easy to cross compile, has more safety features built in that C, but is not overly complicated. The code tends to be more verbose, but also more straightforward. So it's a perfect language to pair, when you know you won't be able to do everything in a high level language.
For me that's what seals the deal. I'd argue that Odin has a nicer syntax, but there is a reason that tools like cargo-zigbuild^1 exists. The fact projects not related to Zig are willing to ship Zig toolchains to make lives easier is a testament to how seriously Zig takes this.
On the other hand if safe Rust is an option that's way more handholding than you're getting in Zig. Lots of "Whoops I forgot" mistakes won't even compile in safe Rust because it couldn't see why they're OK and that's required but in Zig now you've written a bug.
Zig will be much easier to learn than Rust, but it's worth noting that it's syntactically very unstable between releases (there were some huge changes between 0.15.2 and 0.16 to anything involving IO).
It's really hard to predict what you'll actually use professionally in the future or what's going to be popular in ten years, but some of the greatest value comes from just learning a huge variety of topics.
I'm a firm believer in prioritising enjoyment over utility, and I've always found that utility has flowed backwards from the enjoyment. And even if it doesn't, you've had a good time and found yourself richer for it!
> To go deeper, I think I need to dig into a systems language
Most of such code is still written in C.
But honestly, if you just need to squeeze a little bit more performance, you should check the non-GC part of C# first (ArrayPool, Span, stackalloc).
I don't think in your shoes I'd prioritize learning Zig for any of these domains, though, for a few reasons:
* It's not a pre-req for understanding some existing corpus of important software (which is a big reason for C and C++ in 2026) or the language of choice for some current hot domain (as Python is for AI).
* It's not memory-safe, which (whether via GC or Rust's borrow checker) is increasingly viewed as a critical security attribute.
* It's not stable yet, so I'd expect a certain amount of running to keep in place both in your learning and in avoiding bitrot in anything you write in it.
* From the outside, the community seems strangely hostile as well as elitist.
A few I might suggest instead: Rust (both as a language I personally like and as the most different from the ones you've already touched), Go (which is a good choice for employability), SQL (maybe you already know this one if you're doing CRUD stuff but you didn't list it), bash, and more Python and/or TypeScript.
Zig is a very interesting and well built language, but it is also niche, unstable and not offering radical improvements over C.
C, as the foundation of all modern kernels and system tools, among many other things, is extremely unlikely to go away soon.
Everything you do in Zig can be done almost in the same way in C or C++.
I would say the real value of Zig is in the standard library that is more modern and arguably better.
Can you do this in C?
I am generally against the idea of language support for meta-programming, even using C macros or C++ templates.
I do a lot of meta-programming/codegen with external tooling.
That's not an answer. There's a reason why you can't do it in C, and the reason is "the stdlib is poorly designed". No amount of linting can get you around that.
A new modern C standard library would be a very good thing. But I am ok writing my own, tailored for my own needs and style.
All of that is investment, and not all languages pay off that investment.
https://www.youtube.com/watch?v=iqddnwKF8HQ
Personal thoughts: I think Zig will become more stable once 1.0 tag released. Currently I cant find a fix to my error in net. But the folks on Zig Discord server helping me out.
With this in mind: Does anyone here program in Zig, or know someone who does who is not a current C (or C++) programmer?
Most recently I have used zig for:
Linux USB driver for a proprietary industrial digital camera that claude hacked the protocol for (I usbpcap'ped it), bound into an embedded Elixir-Nerves biology workstation. Same workstation has a libtoupcap digital camera for a microscope camera also mounted (here I use zig for the dlload boundary with elixir). The proprietary system I am running it on ironically won't work with windows anymore because the proprietary software it shipped with chokes when there are two cameras attached.
I ship zigler, the embed-zig-in-elixir library. I keep finding more and more uses for it!
Having been exposed to Java < 5 (before generics) Arrays felt somewhat like JavaScript or PHP3. It's a lot more ergonomic today.
But there are still many remnants (like null refs, despite Option<>) that are easiest understood by tracing back Java's historical roots.
I think Zig does, specifically because of its build system and it's C interopt story. Plus Zig has the added advantage that learning it teaches you about how the computer works, how memory gets laid out, etc. So even if it never gets wide adoption the skills are highly transferable.
Just because people don't like this doesn't mean it's not true.
C will almost certainly adopt defer in the next revision standard. C++ (via RAII + scoped classes) already effectively has defer.
But the fact that it's unsafe means it's effectively unadoptable, no reason not to use C inplace of it.
The builtins don’t even compile in these examples. This is 2 years out of date at least.
Until then, use mise, nix, docker, or something similar. (You should be doing this anyway for projects in all languages if you care about them building on anyone's machine other than your own.)
on top of the decision to ban AI, I can see that we haven't seen the last of bad decisions from Zig
Today most people write entirely stable† Rust, and as somebody else mentioned Rust uses Editions to allow it to make any remaining language improvements, but if you were writing mostly unstable Rust you would see a reduced version of the same churn. Last month you could foozle.boozle() and that gets you a Wibble, but then you upgraded and now foozle doesn't have a boozle method, and apparently Wibbles no longer exist at all, everybody says you need to learn about Wumps instead now because those are apparently better or something?
† If you don't use a "nightly" build of Rust or a special opt-in "nightly mode" your Rust compiler only recognises the stable language.
I'm sure this can be rationalized in some way, to either simplify parsing or solve some rare ambiguity, but I just don't see it.
I know this is a minor thing and can be considered as nitpicky, and I expect some friction with syntax when learning a new language, but I just can't stand things I see as gratuitous. Same with the forced use of _ = foo(.{}); to avoid compiling errors...
Explicitly discarding return values is a thing many modern programming languages force you to do.
And the compiler should be just a bit smarter to avoid the .{} thing when it is not strictly necessary.
What's your plan for this? Rebuilding the C varargs mess from first principles?
You don't do this? This is only for varargs or optionals.
.{<stuff>} is just a shorthand for Type{<stuff>} (struct constructor) plus, "hey compiler, you figure out the type". So if anything it's LESS noisy than the alternative, and more forward-compatible if you change a type name for example.
var foo: Foo = Foo{};
There's two ways to shorten it: var foo = Foo{};
var foo: Foo = .{};
It can infer the type of the var from the right hand side; or the type of the right side from the type of the var.So when you see .{} as an argument, it is inferring the type from the function signature. It happens to be empty only because it's using default values (or is a tuple with 0 items).
Edit: fixed the extra dots.
1) It's var foo = Foo{...}; (no intervening dot)
2) I think parent commenter is referring to function call use case call_my_func(.{...})
2) Adressed in the last paragraph.
https://ziglang.org/documentation/master/#Result-Location-Se...
It's a little bit weird, since the types flow in the reverse direction than you would expect.
Currently, doing something with Zig as a target language would spend many more tokens and produce subpar results.
It's honestly a great read as a human but also I packaged it as a skill and saw coding agent improvement, especially around memory usage.
3. https://github.com/tigerbeetle/tigerbeetle/blob/main/docs/TI...
From there you can derive a set of tools and references that you can build skills on.
Any LLM can scratch together an MCP server, its basically FastAPI + functionality. Your goal, then, is to identify the subset of tools and data required to get 'good' output.
If you want to test your MCP server implementation, grab the source of several popular zig projects, rewind their git history, and have your LLM of choice attempt to address PRs for issues on those repos. Compare LLM solutions with the repo solutions, grade on token spend, LOC produced, variance from Zig best practices, and so on.
[1]: https://github.com/rockorager/zigdoc [2]: https://github.com/rockorager/ziglint