lua-users home
lua-l archive

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


> 3. A module. Your user is also a Lua programmer and your module is
> "batteries". Your post-5.2 ideal is to be as unintrusive as possible:
> the user should require your module, and if he fails to assign the
> result to a name, the only trace of your module is an entry in
> package.loaded.

I'm wondering what is the current policy on localizing globals in modules(e.g. `local type = type; local tinsert = table.insert` etc). I never did it before because the performance gains were usually negligible, but there was a point raised that it should be done to protect modules against monkey-patching. 

Peter