Zig vs Rust vs Odin

Rust and Zig will change the way you think. They both have very interesting philosophies, but Rust is way more complex and harder to learn.
My advice: In your free time, do what is fun for you. It will make you a much better developer than learning something for a job.

There is a free open source book for Zig, but I encourage you to donate, if it is valueable to you.
Introdcution to Zig

8 Likes

As a web dev myself (with a bit more experience compared to the OP): If you want jobs, then you don’t need to learn anything. There are plenty of jobs out there for JavaScript and Go.

If on the other hand you want to learn about low-level programming just for education or if you are looking to see if it’s viable to switch from web dev to systems programming, game development or other niche areas (which is why I am exploring Zig), then absolutely learn Zig, Rust and/or Odin as well.

Learning a new language is always helpful.

4 Likes

Thanks for sharing this book. I was finding difficulty in learning the language as there is not much resources. I found plenty of courses and Yt videos when i tried to learn golang initially. I know the language is young and that’s why not much content i could find. I am going with the bookish approach this time as i think that have more value than the limited contents available as video on Zig. Thanks again for this book

1 Like

I’m very surprised you didn’t find what you were looking for. There are now series about Zig, and one or two new videos featuring Zig appear every week: https://www.youtube.com/results?search_query=ziglang&sp=CAI%253D

This series is recommended for beginners:

2 Likes

My guess is that with that background and that time horizon, ā€œwrote $cool_thing in Zig/Rustā€ would be a useful line indeed to have on the rĆ©sumĆ©.

When applying for a Zig role in the US, what does the interview process look like - Is the interview process the same as other languages, where Leetcode style questions have to be solved in a live session ?

I came to rust from the world of garbage-collected languages and became proficient enough that the borrow checker stopped being a constant frustration. I ultimately became frustrated with the language for the same reason I became frustrated with a lot of OO languages - the abstractions seem to encourage dispersing logic. There’s also a lot of reliance on macros for non-trivial stuff and this further obfuscated program logic.

That said, constant verbal abuse from the borrow checker instilled a intuitive sense of ownership, and this ended up being incredibly useful when I eventually learned zig. For that I’ll always be grateful to rust.

10 Likes

I’m no expert, but just like any language, you would probably be asked questions about the language, how it works, describe certain concepts, like comptime/allocator etc. Probably some questions regarding the different constructs, semantics, how to use the build system, the testing framework.

If you have any kind of exercise to do leet-code style I doubt you would be asked to solve them in Zig, you are most probably going to solve them in pseudo-code or in python/Javascript depending on the interviewer.

Well said! ā€œKeep calm and cloneā€ was a mantra that really stuck with me from my Rust experience. Is it always the correct way to handle a problem? Definitely not, but it has saved me from many seg faults because of double frees.

I call Zig the ā€œmodern Cā€

zig calls zig the modern c :3

6 Likes