[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Four paradigms for programming Lua apllications
- From: Peter Melnichenko <petjamelnik@...>
- Date: Mon, 31 Mar 2014 13:41:53 +0400
> 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