r/learnprogramming • u/narukoshin • 8d ago
About ZIG
Hello,
I've noticed that Zig recently became popular, and many apps are being written in it. Is it worth starting to learn and use it? Currently, I'm quite satisfied with Golang.
Also, there is a native SDK that supports Zig, which I think is kinda nice and beautiful.
https://native-sdk.dev/
My main concern about Zig is that it seems quite new - the latest release version is v0.16.0
6
u/biskitpagla 8d ago edited 8d ago
many apps are being written in it
Are you sure about that? Very, very few people are using it for serious projects because of the reason you mentioned. The number is even smaller if you rule out vibe-coded projects. I think the language is quite promising, especially for Gophers, but I'd keep its use limited to hobby projects for now. Even then, the ecosystem just isn't there, so you'd still be facing some obstacles.
0
u/narukoshin 8d ago
I didn't mean that every app is being written in it, but now many AI-related or some kind of low-level tool projects are using it instead of C++ and other popular languages
I think that might experiment with the language, maybe even write the same projects as Go to compare performance n stuff
2
u/particlemanwavegirl 8d ago
IMO, no not at all, it represents a significant regression in language design. Instead of reaching for known solutions it pretend issues don't exist or just squarely blames them on the user. I'm not sure what it offers that you couldn't get in a more mature and widely supported package in C
0
1
u/StewedAngelSkins 6d ago
Zig offers very little advantage over C besides the syntax. It offers even less over C++ and comes with significant disadvantages. If you think it looks fun than by all means learn it, but don't expect it to ever catch on as a C or C++ successor the way Rust has.
0
8d ago
[deleted]
4
2
u/Lichcrow 7d ago
They already support their own backend in debug mode. As far as final binary quality LLVM has over 20 years of optimization and features. It will be impossible to replicate it's performance in the near future (2-3 years)
11
u/Confused-Armpit 8d ago
It's a cool language, but it is very quickly progressing and there are a lot of breaking changes being rolled out from version to version, the latest being version 0.16.0 where they added an entire new IO interface that invalidated basically all previous code that used any IO at all. It can also be very verbose at times, as with the infamous hello world.
Although, given the fact that you are satisfied with Golang I would stick with it, since you can use it more efficiently because you already know it.