DEV Community

Discussion on: How does your language handle memory?

Collapse
 
hrmny profile image
Leah

Rust has lifetimes, it automatically checks for how long the variable is in scope at compile time, it mostly does this automatically, but you sometimes have to specify them when it can't infer them from context, but the compiler will tell you

The Rust compiler tells you a lot and if it compiles it runs if you don't use "unsafe" methods like unwrap