3 ms·
There's a page on the Lua users wiki that neatly summarizes the various arguments: http://lua-users.org/wiki/LocalByDefault http://lua-users.org/wiki/LocalByDef
by jballanc 15y ago
There's a page on the Lua users wiki that neatly summarizes the various arguments: http://lua-users.org/wiki/LocalByDefault http://lua-users.org/wiki/LocalByDefault
Essentially, instead of asking "why global by default", you should have to explain "why local by default is a good idea". In practice, I've found it something easy enough to get over. You don't have to believe me, though...give the Lua Missions a try and see if you don't like Lua just a bit more than you thought you might: https://github.com/kikito/lua_missions https://github.com/kikito/lua_missions
- cygx 15y agoLocal or global by default is the wrong question to ask, because implicit declarations are a bad idea either way. Io - another minimal language - avoids the issue by having different operators for definition (:=) and assignment (=).