"More up-to-date" meaning more sources that are also up to date like the OP, or meaning that the OP is not up to date? Silly English language!
shaftoe444 2 hours ago [-]
Examples target Zig 0.14.
Been some significant changes since then, not least to printing and formatting (see writergate).
embedding-shape 44 minutes ago [-]
Ah, but are those changes in the training data yet?
sgt 34 minutes ago [-]
Probably not, but if this is all AI slop then why bother to read it? There's real documentation (and/or just code). Use it
gren236 2 hours ago [-]
Also build system and c interop is outdated
jdw64 38 minutes ago [-]
Is Zig just a trend, or will it become a solidly established language? After all, learning something is an investment of time. With Zig, it doesn't seem to have the same kind of industry pressure as Rust. There's talk in open source circles about AI-related issues, and on Hacker News people say good things about Zig. The allocator concept looks great. But there's also a possibility that it won't become mainstream, like the D language. I personally like D and think its compiler is beautiful, but being linguistically good is different from being industrially adopted. So should I learn Zig, or wait a bit longer?
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.
scottlamb 2 minutes ago [-]
Is there a particular domain you'd like to get into? It sounds like you're wanting to build expertise in something other than CRUD app assembly, but my language recommendations might change based on whether that's embedded, game development, distributed systems, system administration, etc.
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 probably the best 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.
stephc_int13 4 minutes ago [-]
Lindy effect is very strong in the programming languages world.
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.
Cloudef 12 minutes ago [-]
Zig is not only a language. Its whole toolchain and takes freestanding as a target seriously.
raincole 25 minutes ago [-]
What's the difference between a trend and a solid language? I bet many (I mean like millions) people still think Rust is a trend.
> To go deeper, I think I need to dig into a systems language
Most of such code is still written in C.
pseidemann 31 minutes ago [-]
If you want to learn systems programming, I can recommend learning C. If you want to learn a programming language which allows systems programming, I guess Rust is not a bad choice. But it might be less helpful if the systems basics are unknown.
jdw64 9 minutes ago [-]
I'm an industrial equipment programmer, so I do see C quite often. Actually, aside from C, it's just that when I first learned programming in college, I started with C. I thought that was only natural, but I guess I didn't explain enough. Inside my own head, C just feels like a given.
the__alchemist 17 minutes ago [-]
I'm suspicious that the user base is people who like to program using pointers in business logic. So, the subset of current C programmers who are willing to switch.
With this in mind: Does anyone here program in Zig, or know someone who does who is not a current C (or C++) programmer?
dnautics 12 minutes ago [-]
I program in zig. I am not a current C/C++ programmer (last time I touched C++ was 2003; I can read C ~just fine... write, uh, I just hate make, okay?).
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!
hiccuphippo 9 minutes ago [-]
Also people who wants to get into lower level languages but is scared of C's footguns and C++/Rust language size: me.
tempaccount420 32 minutes ago [-]
IMO, there isn't much space left to fill that Rust couldn't already fill.
code-blooded 25 minutes ago [-]
Simplicity is one thing Zig excels at (at least from my early observations).
Zambyte 10 minutes ago [-]
Yup. Rust tries to make it hard to do systems programming poorly. Zig tries to make it easy to do systems programming well. Rust pushes you into certain (good) practices. Zig makes it exceptionally easy to understand what's happening, making good practices the obvious choice.
dnautics 9 minutes ago [-]
How crazy is it to have a language where combining two foundation traits is such a huge footgun that the linter has to warn you (but somehow you can't ban it within the language)
repelsteeltje 9 minutes ago [-]
Haven't yet used Zig in anger, but it looks more like a successor to C (with a bit of Go), whereas Rust is a successor to C++, first and foremost.
groan 30 minutes ago [-]
Unless you’re actively promoting one of the languages for financial gain, you have nothing to lose by delaying commitment to one, both, or either. If any of them have lasting value, they will be as easy to pick up in the future as they are now. Nobody cares about the old Java or .NET versions where both suffered from limited implementations of generics and other things, and nobody is a better programmer for having used them back then compared to picking them up today.
jdw64 26 minutes ago [-]
Learning a language is ultimately for the purpose of building something, so doing both is a bit difficult. Personally, I find Zig easier and more approachable than Rust, so I've been reading about it, but I'm worried about what I can actually do with it
CyberDildonics 27 minutes ago [-]
It's unsafe and intentionally crashes on windows newlines and tabs. If C adopts defer, I don't think there will be enough of a differentiation to overcome the cynical user hostility.
Just because people don't like this doesn't mean it's not true.
stephc_int13 18 minutes ago [-]
Encapsulating arguments inside .{} seems superfluous and noisy.
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...
brodo 5 minutes ago [-]
In Zig, function arguments are not wrapped in `.{}`. `.{}` is the syntax for creating a struct or a tuple. This is used as a pattern for allowing optional arguments (options struct) and variadic functions (tuple).
Explicitly discarding return values is a thing many modern programming languages force you to do.
pezgrande 2 hours ago [-]
I like Zig but stopped learning it when I realized that all project based on it requires a specific version of the compiler to build.
nvme0n1p1 1 hours ago [-]
The situation will improve once they release a stable 1.0 version.
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.)
eclectric 1 hours ago [-]
I would be interested to learn why that is a problem. As a new Rust learner, I am curious.
tialaramex 26 minutes ago [-]
Historically, say, 15 years ago before 1.0, Rust too was always shifting about and so you'd find that the software you wrote last month now doesn't even compile and the advice has changed.
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.
loeg 1 hours ago [-]
It might not be the version you have installed, or the same version as another project you want to glue together into a single application.
afavour 45 minutes ago [-]
Rust has editions, which can be mixed and matched between different dependencies. AFAIK Zig does not have this.
Very brief. I'm not sure what this adds over reading the language documentation (which itself is not great). As it's entirely organized by language features it doesn't really talk about any larger scale design decisions, which is where I think language proficiency is really found.
aselimov3 2 hours ago [-]
Is this much different than ziglings?
voidUpdate 46 minutes ago [-]
This is essentially just a textbook of zig examples. Ziglings is an interactive exercise
baalimago 1 hours ago [-]
I'm missing the concurrency model.
Zambyte 3 minutes ago [-]
For what it's worth, the concurrency model is very similar to the one in Go. Zig has std.Io.Queue instead of channels, std.Io.async and std.Io.concurrent instead of the go keyword, and switch over std.Io.Select instead of the select keyword. There are lots of resources on concurrency in Go, and the learning semantics would carry nicely over to Zig.
5 minutes ago [-]
fallingmeat 2 hours ago [-]
lots of people into zig this morning apparently!
dominotw 1 hours ago [-]
I am really looking into zig now because founder seems like a cool dude.
miroljub 2 hours ago [-]
Looking for a resource (MCP, CLI, Skill, ...) that would improve Zig support in LLMs.
Currently, doing something with Zig as a target language would spend many more tokens and produce subpar results.
anonfunction 34 minutes ago [-]
One of the preeminent Zig software projects, Tigerbeetle[1], has a great website[2] and markdown file[3] for what they call TigerStyle.
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.
Best bet is tight integration with a language server and the zig docs as MD locally. You may also pull in the zig source code as canonical reference for best practices.
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.
voidUpdate 53 minutes ago [-]
If you worked through this and learnt to use zig, your token usage would be even lower!
short_sells_poo 50 minutes ago [-]
Don't be ridiculous. Learning? That's for the dinosaurs. Just throw an llm at the problem!
all2 18 minutes ago [-]
Both is good. I do both, and to get reasonable output from an LLM I _have_ to do both.
miroljub 36 minutes ago [-]
What's wrong with learning by reviewing the LLM generated code and asking questions interactively? Works for other languages.
- Learning Zig by Karl Seguin: https://www.openmymind.net/learning_zig/
- https://zig.guide/
- 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
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.
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 probably the best 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.
> To go deeper, I think I need to dig into a systems language
Most of such code is still written in C.
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!
Just because people don't like this doesn't mean it's not true.
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.
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.)
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.
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.
1. https://tigerbeetle.com/
2. https://tigerstyle.dev/
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.