23 ms·
It does have full lexical scoping, however "global by default" is good for scripting, questionable for standalone programming. I general yes Lua is a great lan
by Avshalom 14y ago
It does have full lexical scoping, however "global by default" is good for scripting, questionable for standalone programming.
I general yes Lua is a great language, I have a lot of fun writing in it. But it does have its warts (though fewer than Javascript).
- ricardobeat 14y agoHave you heard of moonscript[1]? It is a bit quirky but makes var declarations local by default. [1] http://moonscript.org/ http://moonscript.org/
- brianto2010 14y agoFor what it's worth, you can use the local keyword to limit the scope of variables. http://www.lua.org/pil/4.2.html http://www.lua.org/pil/4.2.html