upvote
If you don’t mind moving the whole issue to runtime, then sure. The value of rust is that you catch these issues at compile time so you’re not releasing these sorts of bugs in the first place and aren’t reliant on the capabilities of the users machine to catch it for you.
reply
[flagged]
reply
The use of RC is orthogonal to the memory safety guarantees of Rust. The use of RC and safety checking of it is handled at compile time, and only the refcounting aspect is runtime.

RC is a form of declaring shared use and is a parallel to shared_ptr in C++.

And yes there are escape hatches for safety that you can explicitly put yourself in. MTE would catch those at runtime , but you would still have prevented a ton at compile time.

There are also escapes you can find yourself in with memory tagging too.

Also, did you really just create a new account (with an inflammatory name) to crap on Rust while still not being able to address the points in my comment?

reply
When is Rust compiler moving away from LLVM, and GCC integration efforts, both written in C++?

That is the thing, there are endless products written in C++ since the 1980's, which no one is going to rewrite in safer languages.

reply
The code will still be incorrect; it's just that you'll know faster.
reply
deleted
reply
Honestly it feels at the right abstraction layer too. With Rust you rely on correctness in translation, it is much better to have defense in depth than in breadth.
reply
Rust is already part of defense-in-depth. Despite its memory safety, Rust still turns on ASLR, guard pages, stack probes, etc.
reply