[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: explicit mode
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 10 May 2016 15:34:47 +0200
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.