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:34 PM, steve donovan <steve.j.donovan@gmail.com> wrote:
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...


We will need some new syntax, invalid today, which will mean "past this line, globals must be explicit". Because it is invalid today, it will not break any existing code.

Cheers,
V.