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...
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.
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?
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.
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.
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
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.
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.)
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.
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.
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.
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...
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.
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?
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.
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.
IMO, there isn't much space left to fill that Rust couldn't already fill.
Simplicity is one thing Zig excels at (at least from my early observations).
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.
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
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.
I just looked this up yesterday so sharing some more up-to-date resources for those interested in Zig:
- 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
Ah, but are those changes in the training data yet?
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
Also build system and c interop is outdated
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.
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.)
I would be interested to learn why that is a problem. As a new Rust learner, I am curious.
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.
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.
Rust has editions, which can be mixed and matched between different dependencies. AFAIK Zig does not have this.
for those new, start with why: https://ziglang.org/learn/why_zig_rust_d_cpp
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.
I'm missing the concurrency model.
Is this much different than ziglings?
This is essentially just a textbook of zig examples. Ziglings is an interactive exercise
lots of people into zig this morning apparently!
I am really looking into zig now because founder seems like a cool dude.
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.
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.
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.
1. https://tigerbeetle.com/
2. https://tigerstyle.dev/
3. https://github.com/tigerbeetle/tigerbeetle/blob/main/docs/TI...
If you worked through this and learnt to use zig, your token usage would be even lower!
Don't be ridiculous. Learning? That's for the dinosaurs. Just throw an llm at the problem!
Both is good. I do both, and to get reasonable output from an LLM I _have_ to do both.
What's wrong with learning by reviewing the LLM generated code and asking questions interactively? Works for other languages.