3 ms·
Unknowable lifetimes are a necessary evil. Rust has them too. It's called RefCell. Without RefCell there are very useful things that are impossible to write in
by kccqzy 2y ago
Unknowable lifetimes are a necessary evil. Rust has them too. It's called RefCell. Without RefCell there are very useful things that are impossible to write in safe Rust.
- pornel 2y agoBut this needs to be explicit, and doesn't undermine other statically-known lifetimes (pointers to the inner cell can't escape it). Just like statically typed languages have some dynamic dispatch features, but despite that still most of their types can be known with certainty.