lua-users home
lua-l archive

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


On Tue, May 10, 2016 at 6:50 PM, Sean Conner <sean@conman.org> wrote:
> exists explicit syntax to declare locals but no explicit syntax to declare
> globals.

I suppose the idea is that the only globals that exist are the
existing contents of _G on startup. Thereafter, no globals needed.
(Certainly would find a 'global' keyword ugly, although consistent)

>  Things like "strict.lua" exist to hack around this limitation, and
> some might say this does exactly what you want (or close enough to it).

"Compile-time" is much better. But then (as I said) existing static
analysis tools do this well already.