3 ms·
It’s not a risk, it is always there. Rust just cleverly hides it behind syntactic sugar, but in reality every single API mandates the what lifetime each paramet
by kaba0 4y ago
It’s not a risk, it is always there. Rust just cleverly hides it behind syntactic sugar, but in reality every single API mandates the what lifetime each parameter should have (they are just generic to lifetimes, and it can be inferred more often than not). This is in stark contrast to any managed languages’ function signatures, and one will have to change to accommodate bigger changes and the other doesn’t.
And I’m talking strictly about memory management here, sure Rust is a very cool language (it is my go to choice for low-level programming) and has a strong enough type system to actually make these refactors safe, but it doesn’t change the fact that this is simply of no concern with automatic memory management.