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?<p>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.
Here is where I think Zig shines. When you are a high level programmer that needs to drop down to a low level programming language for performance reasons. The issue with doing that as a high level programmer is that you don't do a lot of low level work frequently.<p>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<p>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.<p>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.<p>1. <a href="https://crates.io/crates/cargo-zigbuild" rel="nofollow">https://crates.io/crates/cargo-zigbuild</a>
I think if you need to get so close to the bare metal that you'd need <i>unsafe</i> Rust then the equivalent Zig is also too dangerous to use "infrequently". Stuff like writing raw assembly, pointer twiddling, volatile stores or fetches - I would hire somebody with lots more experience to do that properly once if you need it.<p>On the other hand if <i>safe</i> 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.
For clarity in this dual programming language scenario I'm talking about, I'm writing a user facing app that's mostly a lot of business logic.<p>It's running slow so I profile it and I see my math function in pure Dart (or whatever language you are writing in) is the hot spot, and pressures the garbage collector too much, so I rewrite the function in a lower level language that doesn't have as much overhead, to speed things up. Then I just call it from the higher level language through the FFI.<p>The benefit of Zig is the syntax is simple, and the build steps are simple, so it doesn't slow down app development too much
Looking at it from an existing knowledge base and error checking point of view, I feel like C++ smart pointers or Rust is a better option for someone doing a dangerous low level thing rarely. I'm not sure Zig is really all that favorable a choice in your given scenario.
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.
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.
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.<p>> To go deeper, I think I need to dig into a systems language<p>Most of such code is still written in C.<p>But honestly, if you just need to squeeze <i>a little bit</i> more performance, you should check the non-GC part of C# first (ArrayPool, Span, stackalloc).
I'd say it's worth learning new languages even purely for the sake and love of learning! That goes to both Rust and Zig, Rust is arguably more intellectually interesting, whereas with Zig you'll probably be writing useable hobby projects much quicker (I decided to tackle learning Zig and reading Crafting Interpreters simultaneously, transliterating the code in the book as I went along).<p>Zig will be much easier to learn than Rust, but it's worth noting that it's syntactically <i>very</i> unstable between releases (there were some huge changes between 0.15.2 and 0.16 to anything involving IO).<p>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.<p>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!
Zig is not only a language. Its whole toolchain and takes freestanding as a target seriously.
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.<p>I don't think in your shoes I'd prioritize learning Zig for any of these domains, though, for a few reasons:<p>* 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).<p>* It's not memory-safe, which (whether via GC or Rust's borrow checker) is increasingly viewed as a critical security attribute.<p>* 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.<p>* From the outside, the community seems strangely hostile as well as elitist.<p>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.
Lindy effect is very strong in the programming languages world.<p>Zig is a very interesting and well built language, but it is also niche, unstable and not offering radical improvements over C.<p>C, as the foundation of all modern kernels and system tools, among many other things, is extremely unlikely to go away soon.<p>Everything you do in Zig can be done almost in the same way in C or C++.<p>I would say the real value of Zig is in the standard library that is more modern and arguably better.
Why do people still view languages as an investment? If you know programming then it's just a different syntax. Focus on learning programming.
You're not wrong at the high level, but learning a particular language to the point of fluency is still an investment if you're interested in being productive while writing it. Sure, once you have the experience, reading most new languages is easy -- but learning the idioms and particular syntactic choices of a new language to that point that you can reach for them without having to constantly search or consult references isn't something that's instant. There's also a mental cost to how many of those languages you can have "ready to go" in your brain at any given time, and for languages that are evolving -- most of them, at this point, honestly, even old languages like C++ -- there's a cost to keeping up with the language as it changes.<p>All of that is investment, and not all languages pay off that investment.
I predict it will go the way of Ruby but far less adoption or jobs available since Zig community as a whole is anti-AI, which makes it impossible to operate with modern times.
I’d prefer that you watch this video interview with Andrew Kelley. He is describing that.<p><a href="https://www.youtube.com/watch?v=iqddnwKF8HQ" rel="nofollow">https://www.youtube.com/watch?v=iqddnwKF8HQ</a><p>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.
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.<p>With this in mind: Does anyone here program in Zig, or know someone who does who is not a current C (or C++) programmer?
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?).<p>Most recently I have used zig for:<p>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.<p>I ship zigler, the embed-zig-in-elixir library. I keep finding more and more uses for it!
I'm professionally a python programmer with no C/C++ experience, and I do some hobby programming in zig. I tried rust but it seemed complicated and kind of boring. Zig was a lot easier for me to get into. I don't mind that it's obscure and a bit of a moving target, but I have yet to do anything really "serious" with it.
Also people who wants to get into lower level languages but is scared of C's footguns and C++/Rust language size: me.
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.
Hadn't thought of that and I think you're right.<p>Having been exposed to Java < 5 (before generics) Arrays felt somewhat like JavaScript or PHP3. It's a lot more ergonomic today.<p>But there are still many remnants (like null refs, despite Option<>) that are easiest understood by tracing back Java's historical roots.
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
IMO, there isn't much space left to fill that Rust couldn't already fill.
Rust didn't have nearly the industry adoption it does now back in 2020, but it was gaining traction in various parts of the community. If you learned it back then it was either because you love it, or you thought it had staying power.<p>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.
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.<p>Just because people don't like this doesn't mean it's not true.
I feel that Zig will stay a niche language. In this world, there is no reason for corporations to use anything but Rust for this kind of code. And without the corporate push, it will probably still exist for a long time, but the D trajectory is what I predict. I really like the language and I hope it gets more popular, but it seems unlikely to me.