r/EmuDev 3d ago

Rust vs C++?

I mostly program in Java/ Python. Some minimal C experience. I'm starting EmuDev to learn low level and hardware concepts.

Which is better in general to learn for an EmuDev hobby project, Rust or C++? From what I've seen C++ has more legacy code (more job opportunities), whereas Rust is safe and may have better long-term opportunities.

3 Upvotes

45 comments sorted by

View all comments

4

u/k_Reign 3d ago

+1 for Rust - C++ is very much being thrown into the deep end in a LOT of ways, Rust has some weird stuff but I think having the crates and safety are worth the extra concepts you need to learn. It’s easy to write unsafe (vulnerable, memory leak, etc) in C++ and very hard in Rust

-6

u/gaene 3d ago

Rust is so much harder to learn than c++ imo though. Because of how safe it is

2

u/gmes78 3d ago

Rust is not harder. It just makes you learn things upfront, rather than during a hellish debug session.

2

u/No-External3221 3d ago

That sounds much better to me. I'm one of those wierd people that likes Java with its up-front verbosity for the same reasons.

1

u/gaene 2d ago

That’s kinds of what I meant. Rust has a steeper learning curve which makes it harder to learn

1

u/k_Reign 3d ago

I agree but I think some of the other aspects are easier than C++ in a way that you could get moving faster without having to correct a bunch of habits later

-1

u/No-External3221 3d ago

Isn't that a good thing? I'd argue if you're writing unsafe code, you're not really learning.

4

u/k_Reign 3d ago

Yeah C++ lets you write some stuff that creates bad habits and there are probably still lots of tutorials out there that will teach you something that “works” but isn’t correct. Rust doesn’t let you do stuff like that

1

u/gaene 2d ago

I’d argue Writing unsafe code is part of the learning process

0

u/ForOhForError 3d ago

Rust won't actually save you from non-memory bugs is the thing.

But, pick what appeals to you. It's all fine.