Hacker News new | ask | show | jobs
by stuxnet79 2466 days ago
Not different, if "safety" is your only criteria. GC languages provide memory safety at a cost (performance). C, C++ and Rust are preferred in settings where you don't want the GC to capriciously affect performance (e.g. HFT). However, out of the 3, Rust is the only one that is provably "memory safe" at compile time because it provides constructs (ownership, borrowing) that force you to write safe code. If your Rust code can compile it's more than likely safe. You can write equally performant code in C / C++ but both languages have a lot of foot guns.