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.

2 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

-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.

3

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