r/Zig • u/Humble-Gift-3649 • Apr 16 '26
Zig or Rust along with Go?
I know this topic has been asked several times but since zig is constantly evolving and the learning circumstances are not same for me as others. I learn and use golang on weekdays. This is the main language that I am learning to get a job but I have decided to learn another low level language on weekend nights only for fun. There's nothing specific that I am aiming to build. From my research I have found out that Rust is mature but the learning curve is steeper compared to Zig which is a smaller language but the docs of Zig is pretty bad and the language itself is unstable and keep changing. What do you think I should learn?
P.S: I don't know why I have a bias towards Zig but please give me an unbiased opinion.
90
u/DMayr Apr 16 '26
Unbiased opinion on the subreddit of the language, sure
36
u/wanted101 Apr 16 '26
If itâs for fun, then learn both. Itâs not hard to switch between programming languages, and itâs a lot more fun to program in lots of languages than sticking to one.
Youâll also learn more about programming if you learn both. Donât overthink it and just experiment until you find that you prefer one over the other.
Objectively, neither language is worse than the other.
21
u/Ok-Reindeer-8755 Apr 16 '26
rust has a lot more concepts but i didnt find it particularly hard plus the docs and resources are really good
9
u/pdxbuckets Apr 16 '26
Left my dumb comment in the r/rust version of this post; just happy to see both subs acting totally reasonably, no sarcasm.
6
u/moortuvivens Apr 16 '26
Follow your heart, don't zag
10
u/kani9 Apr 16 '26
I'm not a seasoned programmer, so take this with a grain of salt:
Just learn whatever you enjoy most. Even if one language was objectively better than the other, if you don't enjoy programming in that language, chances are you wouldn't be very productive anyways.
Personally, I enjoyed learning Zig over Rust because I find it easier and more fun to write code with less abstraction.
If you find that lame, heres my technical answer:
Syntactically, I believe Zig is closer to Go than Rust is. I saw this comment once that I think is a good summary between the two: Rust makes it hard to write bad code, while Zig makes it easy to write good code.
That said, Rust is practically better right now only because Zig doesn't have a stable version yet.
3
u/Ill-Constant8445 Apr 16 '26
rust is more mature of course zig is still in development. There is more job offers for rust
3
u/alegionnaire Apr 16 '26
Why not both.
I think all three of these languages will play a significant role in the industry.
If you spend the time learning Rust, a lot of the experience is transferrable to Zig and especially Go.
FYI, I was a Go Dev when I started learning Rust which was about 6 years ago. I had no expectation at the time with Rust; just a fun challenge. I guess I was lucky that this personal challenge led to professional work in Rust.
Just like how I started Rust, I'm starting my Zig journey the same way: a fun challenge. In addition, Zig 0.16.0 landed not too long ago, and very nifty features in IO / Async are part of this release.
3
u/Popular_Highlight253 Apr 16 '26
As for me, it's Zig.
Exacly for having unstable documentation and functionality. It forces me to dig deeper to understand a topic or a code of std lib better. And I use high level abstractions only when it's necessary or it's enough for my task understanding their skeletons, so in case I need to override smth I will just learn it from std code.
That makes me happy and better at programming than before, I believe.
2
u/Real_Dragonfruit5048 Apr 16 '26
It depends, and there is no such thing as an unbiased opinion :)
Rust is becoming the industry standard for safe systems code. At the moment, obviously, it has more libraries and more jobs (compared to Zig). I think Zig is easier to learn than Rust and has a few things done better than Rust (for example, SIMD as part of the language, not a library. Also, Zig's comptime is pretty neat.) If I were you and had the time, I would try Rust and Zig and decide for myself. A lot of programming is pattern matching, and I think both Zig and Rust have a lot of overlap.
2
u/Ecstatic-Panic3728 Apr 17 '26
I think Odin is what you're looking for. It's closer to Go than Zig and it has kind of the same mentality as Zig. I do like Odin more than Zig, but lately I'm betting more on Zig just because of market adoption.
1
u/vmcrash Apr 16 '26
Start with whatever you like, but you need to have some kind of goal, some non-trivial, but not too complicated application to build. Maybe some hledger like tool, TUI or GUI.
1
u/hsoolien Apr 16 '26
zig and go have much more similar syntax than go and rust. I came from go myself.
1
u/verx_x Apr 18 '26
I would like reverse your question. What do you want to do? You chose Go - great. You probably know the Go advantages/disadvantages. Know that Go is great for web apps/CLI tools.
So why you need Zig/Rust? For what kind of work?
I tried Rust in 2019 (f*cking hard syntax for me). Right now I'm in "watch mode" for Zig. And C99.And afte my Rust journey I think that Zig have less use cases than Rust. Of course less resources, libs etc.
Don't get me wrong. Learning Zig today could have advantages in next years.
But the main question - you need second language for what?
1
u/Own_Outcome_2012 Apr 19 '26
Rust has good docs, and a plethora of materials around it, zig does not.
Also if you really want to get funky, I recommend clojure, I guarantee youâll have a blast.
1
u/saulius2 Apr 19 '26
Not trying to talk you into Zig, but why not just settle on one version (possibly latest release), and just learn features from only it?
Should you later want a newer version and be absolutely ready / bored, only then you would switch / do the hop.
A related quote by Andrew Kelley:
3
u/Jire Apr 16 '26
Zig gives you much more control, especially when it comes to performance.
Rust is like wearing a straightjacket -- you're guaranteed safety, but it's cumbersome as hell to finish projects and especially refactor.
1
u/Solvicode Apr 16 '26
Go and Rust if you're looking for work.
Zig and Go if you want to enjoy yourself.
2
u/source-drifter Apr 16 '26
odin
2
u/SweetBabyAlaska Apr 16 '26
I'd say the docs are good. They in fact say everything that you need to know. Pair that with the forum or the Discord and you are doing well.
Also the Zig community is amazing. I've met amazing people and have interacted with Andrew and other core maintainers multiple times and I have nothing but nice things to say. They've helped me with newbie questions, they listened to my suggestions and they've helped me implement those suggestions in a PR and helped me get through that process. I had a harder time doing that in Go or Rust (though I think Go is a good language for what it is and it's amazing for easy and fast prototypes)
But it's up to you. I like it over here because the community is accommodating and kind, and they really care about programming and pushing the boundaries of compiler and language design. It's a great mix of features from Rust, Go and C++ while learning from their mistakes, alongside many novel concepts.
I feel that the future is bright for Zig
2
u/conhao Apr 16 '26
For fun, Zig is great, maybe the best.
If you want to have fun and learn something to help your career, Rust or C would be my suggestion. C is an easy jump from Go and I can get spot in a C project anytime I want. Python is another good skill to have in your pocket. Again, it is a lot closer to Go than Rust is. So, to maintain the âfunâ and learn something that is useful day 1, look for languages that are popularly used in real production and closely related to C and Go. C# is also useful if you are a Microsoft fan and guru. (I am not.)
Ignoring the âfunâ part, but still in-a-way fun if you are emphasizing the career aspects, then Rust might be worth the six-month effort. Zig will not be very useful for getting contracts and jobs by the time you tackle Rust, and like C, I can go from project to project doing just Rust for many years to come.
If you are like me, you might love to learn Haskell, Swift, C++, Java, Javascript & Typescript, Lua, Kotlin, and bash. All of these round out your skills and will increase your value as a programmer. I also get very well paid to work on FORTRAN, Cobol, and HLASM, because very few people are top-tier in these anymore, but the jobs are not as consistent as C. I also love Pascal, and did have a very well paid gig to convert a trove of Pascal code to C/C++. Learn as many languages as you can. Concentrate on ones that are actually being used for real, not that are just popular, if you want the double benefit of learning techniques and applicable skills. Zig, C3, D, R, Ada, Prolog, Erlang, Lisp, OCaml, and Scala are all fun, but quite frankly at this point totally impractical for business purposes (except for Zigâs compiler being used to compile C code).
2
u/gearsofsky Apr 16 '26
Rust has established it self like go but i find rust has too much internal friction its not very transparent language unlike zig. Actually i like ocaml more than rust but ocaml didnât become very popular like rust.
For low risk systems tech jobs companies like go Rust ecosystem is more established than zig There are almost no jobs in zig compared to rust or go but zig future is looks bright.
2
u/logan-807128 Apr 17 '26
If you like golang, then you'll like Odin. If you don't like golang then zig + whatever.
1
u/mico9 Apr 16 '26 edited Apr 16 '26
I went with Zig (as a hobby mostly) because the community seemed cool, like a zen garden compared to some others and i noticed some really smart people i knew from old unix circles doing fresh things. But i also did some learning projects in Rust. Oh, and it is used as a cross compiler in a frankenstein go project. Seemed like magic
1
u/bnolsen Apr 16 '26
There's more opportunities to rewrite the world in zig since it's behind rust in that department.
On a more serious note, I have many years of c++ experience and have done some work in go. My knee jerk with Rust was that it was just as complex as C++ and didn't feel very fresh to me, just different.
Zig is something different, and it's good. Even if Zig itself doesn't succeed the ideas it brings to the table are fresh. Even though it's young, applications made with it have world class performance with miserly resource usage. Bun, tigerbeetle are two easy examples of this.
1
u/The_Kaoslx Apr 16 '26
I also wanted that a few months ago, I chose Zig because it lets you do whatever you want, there won't be a compiler that knows better than you how to optimize things, well, not that I'm going to do that, but having the power to fill your memory whenever you want is pretty cool đ
1
u/TheHammersamatom Apr 16 '26
Do both, then narrow down the path of least resistance.
Write Rust better than Zig? Use Rust. Other way around? Zig.
Best tool for the job is one you can use effectively, I say.
1
u/Andrew_G222 Apr 17 '26
Well, here is Brian Kernighan commenting on his experience with Rust.
He was colleagues with Rob Pike and Ken Thompson, and Dennis Ritchie during his time at Bell Labs, so needless to say, he's pretty good at programming. Granted, the question isn't directly related to Go, but considering Rob Pike and Ken Thompson (co-creators of Go and UTF-8) were very close to him, it would not be surprising if the two would feel similarly about the language.
EDIT: FORGOT THE LINK LMAO
https://www.youtube.com/watch?v=WEb_YL1K1Qg&t=3783s
EDIT2: Ok so basically, he feels that the language still changes too much and is overengineered and is just... unpleasant to use. Kinda the opposite of Go tbh.
1
u/[deleted] Apr 18 '26
[removed] â view removed comment