Thread Tools Display Modes
Prev Previous Post   Next Post Next
05-17-19, 05:54 AM   #1
Pindrought
A Defias Bandit
Join Date: May 2019
Posts: 2
Why declare local versions of functions?

I've been looking at source code for some existing addons, and I noticed something that doesn't make sense to me.


Why do they do this for all their functions?

Code:
local _G = _G
local abs = abs
local assert = assert
local collectgarbage = collectgarbage
local date = date
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Why declare local versions of functions?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off