it's very strange to me when people complain that "rust is supposedly safe but has memory leaks!". I don't think it's ever pretended to prevent memory leaks?
Conversation
It is actually a good sign, no? People adjusted to Rust's memory safety and now they wanna raise the bar!
1
2
sure, but to achieve this you have to put extreme restrictions on resource usage; otherwise determining leaks equivalent to the halting problem. it's not just a case of writing a clever compiler.
2
3
You could say the same about pretty much any static analysis or type system though? You can get around the issue of the halting problem by reducing expressiveness: there might be some valid programs that are no longer accepted. This is the case with borrow checking for example.
Rust chooses a certain set of things to verify statically, but there's no reason why you couldn't build type systems that go beyond that. Pony’s type system prevents deadlocks, for example. Keeping things usable is a challenge however!


