There are some advantages of declaring stuff as local instead of assigning it to the addon object;
- You prevent a table lookup when referring to the variable
- It also looks a hell of a lot cleaner
- The variable can't be accessed from outside the scope (might or might not be an advantage)
Anyway, I've never used FuDebugger, so I have no idea what it does or how it works.
You cant refer to it outside of its scope. So you cant access it directly from a 'debugger' type tool, you have place it in a globlal table or make it global itself.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I hope the title isn't misleading...
I see a lot of AddOns that start like:
Why do they declare local variables outside of any functions? Which namespace is that? Would something like this
have the same effect?
How can I Monitor a variable declared like in the first example in FuDebugger?
Thanks in advance for any answers!
There are some advantages of declaring stuff as local instead of assigning it to the addon object;
- You prevent a table lookup when referring to the variable
- It also looks a hell of a lot cleaner
- The variable can't be accessed from outside the scope (might or might not be an advantage)
Anyway, I've never used FuDebugger, so I have no idea what it does or how it works.