lua-users home
lua-l archive

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


On Tue, May 10, 2016 at 3:27 PM, Viacheslav Usov <via.usov@gmail.com> wrote:
> Still: what speaks against implementing a new Lua compilation mode where
> everything must be explicitly declared to be either local or global, and
> anything not so declared would result in a compilation error?

Ah, but if it isn't backward-compatible, there's the inevitable
problem...I suppose we've all learned not to rely on modules exporting
globals, then 'error on global set/get' is not unreasonable.

That being said, static checkers like luacheck or lglob are pretty
good at finding these kinds of errors...

steve d.