|
On 12/12/2012 09:26, steve donovan wrote:
On Wed, Dec 12, 2012 at 9:40 AM, Josh Simmons <simmons.44@gmail.com> wrote:With 5.2 (and 5.1 too, really) pushing towards not registering globals for libraries I'm not sure what the advantage of such a list would be as it's going to be very heavily application dependent?Yes, my mind wanted to compulsively put 'local' in front of those statements... It's better not to let random stuff leak into _G in the first place steve d.
On one hand, it's very true; on the other, we constantly re-use the same names, little funcs, aliases and such. I guess many have a small module (mine is called 'kit') systematically required on top of every lua file. This is not very different from true globals --except each file could locally alter the definitions, but precisely this is what we do not want to do, instead be able to rely on common, well-known and proved semantics (of our own tolkit).
Denis