If no friendlier safe high speed programming language appears, I rather use C/C++ and trade safety for friendliness.
If no friendlier safe high speed programming language appears, I rather use C/C++ and trade safety for friendliness.
Rust is generally perceived as having many of the same developer kindnesses as C++, while having same-class performance. Learning it has a bit of a curve, but I found that it eventually clicked (I have a C and C++ professional background).
Maybe the risk is mitigated in other ways. Your software runs as a cli and not a service. It doesn't process outside input. It is run in an ironclad sandbox.
But honestly, if you think the way C++ with RAII want's you to then you should already be following the rules that Rust want's you to follow for the most part.
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p26...
E.g. Whenever handing out the raw pointer stored in a unique_ptr, the code receiving that raw pointer can delete it, which will very likely lead to a use after free and certainly to a double free issue.
```
class Foo;
Foo get_foo() { std::cout << "whoops, I forgot to return\n"; }
int main() { const auto foo = get_foo(); }
```