lua-users home
lua-l archive

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


On Fri, Jul 16, 2010 at 2:32 AM, Juri Munkki <jm_list@cameraid.com> wrote:
> However, if you only use strict.lua occasionally, some errors might slip
> by. For instance, you might have a function where you use a variable
> called "parts" and if you forget to make it a local variable, things work
> fine until the day you use the same variable again in another module and
> they both try to use it (for different purposes).

Which is where my initial suggestion comes in, because each chunk
(i.e. module) would have its own environment, and it's up to the
calling code as to whether it wants the contents merged into its own
environment.

--
~Jonathan