> In C++, this could be achieved if all local variables were in fact std::shared_ptr captured by value.
So, in C++ you do actually get to pick what happens and there are plenty of options but for our purposes here all we want is a (mutable) reference capture.
However, experienced C++ programmers would never do this because C++ is all foot guns all the time, so you can express what you meant and it'll blow up and cause chaos because now our reference outlives the thing referred to. Oops.
In Rust we can write what we meant, but instead of the program exploding at runtime the compiler will politely point out that this can't work and why.
And so armed with the knowledge from that, we can (in Rust or with C++ although it's harder to spell in C++) write something that'll actually work.
We could move the captured variable. In Rust we just use the keyword `move`, now the captured variable is gone, moved inside the closure, and so as with the Tcl the same variable (the one moved into this closure) is used each time the closure is called, and if we make another closure that's got a different captured variable.
But we could do the "shared reference" trick, that type is spelled Rc in Rust.