Zig vs Rust vs Odin

I have 2 year experience as a backend developer mainly working on golang and NodeJs. I am looking forward to learn a new language mainly for getting good job opportunities. I am really confused on what to learn. There is many languages now and i want help choosing one. I see different opinions and can’t truly decide. I want to know what will be future proof and i can make good money coding on that lang. Kindly share ur opinions.

3 Likes

Rust isn’t going anywhere.

Zig isn’t either (partly because it’s a VERY ambitious project attempting to do FAR more than Rust when it comes to actually touching LLVM itself).

I honestly hadn’t even heard of Odin until now.

Personally, I am in a very similar boat and have avoided Rust because of the universal complaint about the confusing nature of the borrow checker while being drawn to Zig because it seems far more ambitious than even Rust.

8 Likes

Appreciate ur response. What do you think about the adoption of zig by more companies potentially creating more jobs. Will it happen?

1 Like

Absolutely. I think the LLVM aspect makes Zig unique in the world of safe C++ replacements.

Here’s a good intro that brought me here:

2 Likes

Rust is getting all the hype right now, and it’s also the most stable (AFAIK) so if you’re looking to get a job in one of these languages right now, that’s probably your best bet. But in the long run, if you become proficient at any of these languages, you will be valuable.

But then again, IMO rust takes the most time to learn, so… /shrug

3 Likes

Welcome to Ziggit!

I am looking forward to learn a new language mainly for getting good job opportunities

I’d suggest Java or C#, if your goal is purely to just get job opportunities. Or just keep getting good at Go. I think the amount of Jobs in any of those three languages dwarfs the amount of Jobs in Rust/Zig/Odin combined.

Now will that always be the case? I hope not. Rust, Zig and Odin all have much more interesting things to offer learning wise than Java or C#. So if you are also interested in just growing as a programmer, then I think all three are worthwhile.

Rust is probably the language with the most job prospects currenlty, but even those are still limited. Learning Rust will take a lot of effort and time, relative to the rest. When you read through Rust docs and discussions there is a lot of talk about the heap and stack that can be confusing as Rust still tries to abstract that away from you.

I found Zig to be incredibly easy to pick up (granted I had learned Rust first, so was familiar with some ideas). The hardest part for me with zig was coming to not worry so much about what allocator i should pick and just using the GPA DebugAllocator. Once you get a hang of things, you start to realize when the other allocators make sense.

It’s been almost 2 years since I tried Odin, so I can’t give good opinion on it, but I remember it feeling a lot like Go, syntactically.

11 Likes

Learn Zig because you can pick it up quickly, and everything you learn is transferable knowledge to whatever you end up doing. When you program Zig you’re not learning esoteric Zig language rules, you’re mostly just learning how computers work.

54 Likes

Wow, the creator himself.

Took your advice, going to do ziglings.

Thankyou.

6 Likes

There are two great reasons to learn a new programming language: because you find it intrinsically interesting, and because there’s some program or domain / niche you want to do work in, and the language is particularly well suited.

“The most jobs” is not a great reason. Not because employment isn’t important, of course it is, but because this isn’t the most useful way to think about the job market.

As a ‘toy model’: is it better to compete with 10,000 developers for one of 2,000 jobs, or is it better to compete with 100 developers for 150 jobs? The latter, right? The first one hires the top 20% of the applicants, the other one hires anyone they can get their hands on who is plausibly able to do the work.

A different point along the same dimension: you could learn Python, that or Java, one of those is most likely the language with the most jobs. Let’s say Python. Spending a lot of time getting good with Django doesn’t help you with ML jobs, spending a lot of time getting good at ML doesn’t help you with Django jobs. Do a lot of machine learning in Julia, and any smart Python ML shop will hire anyway, because languages aren’t all that important compared to domain expertise.

The best thing you can do is decide what kind of programming you want to be doing, then figure out what it’s going to take to make yourself a compelling hire for that kind of programming. This involves languages, domains, but also markets: if you want to get into games you’ll have to be more competitive, because lots of people want to do it relative to the jobs available. If you could stand learning COBOL, they’re desperate to hire and you would probably be set for life.

Obviously around here we like Zig, of the three you listed ^_^. But whether it’s a good use of your time depends on how badly you want to learn it, and what kind of programming you want to do.

19 Likes

There’s already companies adopting Zig, although most of them right now are adopting the Zig toolchain, rather than the Zig programming language.

1 Like

Perhaps I’m biased and this is just my opinion, but I wholeheartedly agree with Andrew. Zig has opened my eyes much further than any other language has. It’s like a safer C without having too much magic in the language. I’ve used Go and Rust and played with Odin but I feel like Zig’s philosophy is where it’s at.

6 Likes

partly because it’s a VERY ambitious project

Sometimes I wonder if Andrew and the Zig team are choosing the highest effort option at every junction on purpose just to prove to the world that they can.

11 Likes

Back when Andrew had a Twitter account, basically exactly that sentiment was his pinned tweet for a little while.

12 Likes

I think zig gives better return on investment than rust. simpler language in many respects, but still pushing boundaries. Compile time story is better and looks likely to get vastly more so. And with its sentiment of being a better C, it feels closer to the machine and easier to understand. And anything you learn there is directly transferable to systems programming jobs in general.

7 Likes

Start from plain old C

1 Like

I think it’s a lot nicer for beginners to get a stack trace on array out of bounds and segfaults rather than just the words “segmentation fault” and nothing else.

18 Likes

i am not talking about getting a stack trace, but about getting job

But you learn by making mistakes and fixing them, so the more information you get about where you messed up the faster you can solve them, and the more mistakes you can make. Since both language are very similar I don’t expect it to be hard to go from Zig to C, just like it wasn’t hard for me to go from C to Zig.

10 Likes

If you’re purely looking for ‘carreer advice’ instead of the fun of coding you’re probably better off with C# or Javascript tbh :wink:

All three languages posted in the title are still too niche to matter on the job market (even Rust).

The other question is of course whether it even makes sense to start into software engineering when the main motivation is to land a lucrative jobs these days since there’s a massive bubble of ‘code monkey jobs’ which got to burst sooner or later (and not only because of AI)

2 Likes

I still want to push back on this, having spent my career thus far largely in weird niches. If your goal in life is to work for JangaFX, and they do hire from time to time, learning as much Odin as possible is a good start on that.

Or someone might get hired because of Zig and end up writing Rust (weirdly specific! how would I know this)

OP has two years of job experience, on average that means he’s looking to fill out another 38 years. 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é. I can’t speak for Odin in that respect but I’m not counting it out, either.

I genuinely think someone who doesn’t know either language and is interested in the niches classically filled by C, is best off learning Zig and working with C on that basis. Ontology doesn’t need to recapitulate phylogeny. If you know one, learning the other is much easier, so why not front load the satisfaction instead of the frustration?

10 Likes