getglobal(x) doesn't just
essentially return _G[x] -- it
literally does that:
Code:
function getglobal(varr)
return _G[varr];
end
It's defined in
FrameXML/UIParent.lua. There is absolutely no reason to ever use getglobal in actively maintained or newly written code. The only excuse for it to be used anywhere would be in ancient code that still works but is not being maintained by anyone.