|
|
|
|
|
by sgeisenh
865 days ago
|
|
I think it's more subtle than that. Rust has a notion of non-lexical lifetimes (https://rust-lang.github.io/rfcs/2094-nll.html) and the compiler often completely avoids the use of the stack for small, trivially droppable values, regardless of their lexical scope. In some ways, `let` in Rust is a more C-like variant of the `let ... in ... end` construct from OCaml. Not to mention that you can always introduce a new lexical scope with `{ ... }` in Rust code. |
|