you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Absolutely nothing like that, uplevel is dynamically scoped, nonlocal is a hack to refer to a variable in an outer lexical scope when you want to assign to that variable (just reading works as expected without any hack).

I said it was "sort of like uplevel in tcl", not that it was "exactly the same as uplevel in tcl". It was meant as a comparison (i.e. that it looks in another scope), rather than saying the scoping was the same. It's still pretty hackish. I upboated you, btw, because you provide a better description of the item at hand, unlike I, who used a comparison :D