lua-users home
lua-l archive

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


On Thu, Jul 15, 2010 at 8:34 AM, Jim Whitehead II <jnwhiteh@gmail.com> wrote:
> When Roberto introduced this, he said that the checking wouldn't be
> turned on until the keyword was used (or some other trigger happened).
> I believe that's what is happening here.

Well that's confusing. I would prefer to have it always on. Having it
off until the keyword is used would having confusing interactions if

    Function declarations should be declared as well (probably with that
    "global function foo ..." syntax, similar to "local function foo").

goes through (I feel it should). So then the user would suddenly have
global checking turned on without intentionally doing it. Better to
just have it always on I think.

There is also a compatibility problem for the "global function foo ...
end" syntax. This code would no longer work as expected:

local foo;
function foo () end

(The local foo would be a function in 5.1 and nil in 5.2.)

-- 
- Patrick Donnelly