|
No, because that's not really the point of Rust. You make the sacrifice of a "punishing" compiler, and spending more time writing code, but you gain software that's more likely to be "correct", safe, and not leak memory. Really, as in all things computers, it depends what your set of requirements are as to what trade offs you make |
The much bigger problems imho are not really tractable. e.g. consider something that does:
there's no "leak" in the OS sense as everything will be reclaimed upon server::~server... but your memory usage will be strictly increasing. Can Rust detect those cases ? As in my experience this is the most common leak pattern (of course not in a simple example like this, but when your "server" architecture starts being split across multiple threads and source files...