On Tue, Jan 22, 2013 at 9:24 PM, Eric Chiesse <echie...@gmail.com> wrote: > In the end, natural selection will make best modules live and the ugly > ones die (unless they adapt themselves).
That is the hope ;) And Hisham encourages this Darwinism by _not_ being the gatekeeper! All is not lost on _accidental globals_, e.g. see http://lua-users.org/wiki/DetectingUndefinedVariables I've put my own extended version of David Manura's globalsplus.lua (which is based on globals.lua in the Lua distribution) up here: https://gist.github.com/4602636 Calls luac for you, and shows any syntax errors. If none, presents undefined globals in the same error format. I find it useful for a quick precheck. If it finds a globals.whitelist in the same directory, it will use that. It also checks that you have not misspelt library names, e.g. math.sine. It's a little thing, maybe should be a rock (everything should be a rock, really ;)) It's really only Lua 5.1 since it looks at a particular bytecode version. These tools are obviously more useful if people are strict about using local, but they create enough red ink to force people to move in that direction. As for 'next = 1', there is a solution, although it does incur some runtime costs - make the standard tables read-only. (It occurs to me as I type that the little utility discussed above can be taught to throw a wobbly if any assignment takes place to a field of a known whitelist global.) However, here I am degenerating policy discussions into mere technical solutions again steve d. ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d _______________________________________________ Luarocks-developers mailing list Luarocks-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/luarocks-developers