lua-users home
lua-l archive

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


> On 8/07/2010, at 6:00 AM, Roberto Ierusalimschy wrote:
> 
> > One option would be to ban assignment to globals at all inside
> > functions. Another option would be to only allow assignments to
> > global variable previously seen in that chunk.
> 
> Could this be achieved this with a variant of strict.lua?

Sure, but only to a point. strict.lua is a dynamic check, not a static
one.  It still needs a minimum of tests to find errors. It does not
provide an easy way to circumvent the restriction. And it is optional.

-- Roberto