lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I didn't mean to suggest that it was Lua's responsibility to deal with this issue. Just that if one is relatively new to Lua it's easy to say "I'm not using global variables" and yet be making fairly heavy use of them.


On Jul 21, 2008, at 8:42 AM, Stefan Sandberg wrote:

... and that's their responsibility, not lua's... It's up to them to do proper research subtle language differences, imo..

Mark Hamburg wrote:
On Jul 21, 2008, at 6:03 AM, Manish Jain wrote:

2) we are using very less number of global variables.

Remember that global variable usage can be subtle for those coming from other languages. For example, calling string.format takes two table lookups in addition to the function call. If you cache string.format in a local variable, you eliminate those.