[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Globals (more ruminations)
- From: Jonathan Castello <twisolar@...>
- Date: Fri, 16 Jul 2010 03:07:12 -0700
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
- References:
- Re: Globals (more ruminations), Mark Hamburg
- Re: Globals (more ruminations), Roberto Ierusalimschy
- Re: Globals (more ruminations), Geoff Leyland
- Re: Globals (more ruminations), Alexander Gladysh
- Re: Globals (more ruminations), Roberto Ierusalimschy
- Re: Globals (more ruminations), Juri Munkki
- Re: Globals (more ruminations), Roberto Ierusalimschy
- Re: Globals (more ruminations), Patrick Donnelly
- Re: Globals (more ruminations), Roberto Ierusalimschy
- Re: Globals (more ruminations), Geoff Leyland
- Re: Globals (more ruminations), Roberto Ierusalimschy
- Re: Globals (more ruminations), Geoff Leyland
- Re: Globals (more ruminations), joao lobato
- Re: Globals (more ruminations), Miles Bader
- Re: Globals (more ruminations), Jonathan Castello
- Re: Globals (more ruminations), Miles Bader
- Re: Globals (more ruminations), Jonathan Castello
- Re: Globals (more ruminations), Juri Munkki