Hacker News new | ask | show | jobs
by kindfellow92 3103 days ago
An argument could be made around you not being smart enough for C++ either if you are truly unable to write the equivalent program in Rust.

Rust simply makes memory-correctness something the compiler can check. Correct C++ programs are the same as correct Rust programs, the compiler simply isn’t enforcing it.

1 comments

> Rust simply makes memory-correctness something the compiler can check

and the latter half of that statement is where things get problematic. Prove it to the compiler has repeatedly been too hard.

if it's too hard, drop to unsafe - you have the same guarantees as C++ there.

the real problem is telling when it's impossible, e.g. in recurrent data structures, like linked lists and trees. that takes practice.