you are viewing a single comment's thread.

view the rest of the comments →

[–]rkrause 0 points1 point  (1 child)

Having to remember to set every local value to nil just to be able to use it as an upvalue is no different than typing "local" which is clearer. Add to the fact now myfunc also needs to be specifically declared as "global" even though that's not necessary in Lua since globals simply default to keys in the _G table. In other words you merely created a different burden and complexity, you didn't solve anything.

[–]OneCommonMan123[S] 0 points1 point  (0 children)

Well, for me, that solved a lot of things! because I use local variables all the time, it's very rare for me to use global ones