I have been reading about this new language for a while. It’s a C competitor, very slim language with very interesting choices, like supporting cross platform compilation out of the box, supports compiling C/C++ code (and can be used as a drop in replacement for C) to the point in can be used as replacement of ©make and executables are very small.
But, like all languages, adoption is what makes the difference. And we don’t know how it goes.
Is anyone actually using Zig right now? Any thoughts?
I’ve heard of it, and don’t know what the point is.
In zigs defence, I felt the same way about rust a few years back as well.
I wonder what the killer feature for zig is. At least rust promises safer code, what does zig promise?
I think the main advantages over C are:
- better tooling
- modern syntax
- by default, pointers must be non-null. You have to specify if you want to use null pointers
- better exception handling using the functional style of exceptions-as-values
There are probably more, but those are the ones I remember.
I really don’t see what niche it is trying to fill that isn’t already occupied.
Rust is as successful as it is because it found a previously unoccupied niche: safe systems programming without garbage collector and with high level abstractions that (mostly) optimise away.
I don’t think “better C” is a big enough niche to be of interest to enough people for it to gain a critical mass. I certainly have very little interest in it myself.
comptime is a huge killer feature for me. I used it to generate ARM lookup tables at compile time and it’s amazing, it also removes the need for generics as types are just arguments
for example theVecfunction accepts a type as and returns a struct that can hold arbitrary amounts of said type on the heap.
I eventually switched to rust + proc macros tho (zig solution was MUCH cleaner!) because both ZLS and the Zig compiler are terrible and still needs a lot of work.


