3 ms·
I'm not sure about that though I haven't used tcl in a while and was never an expert. I think tcl upvar allows you to explicitly do what lua's closure implement
by giraffe_lady 4y ago
I'm not sure about that though I haven't used tcl in a while and was never an expert. I think tcl upvar allows you to explicitly do what lua's closure implementation automatically does.
They aren't the same thing but they are closely related concepts and similar solutions to the same potential problem.
- ufo 4y agoA big difference is that Tcl's upvar is dynamically scoped. A more appropriate Lua analog would be Lua's debug API (e.g. debug.setlocal)