lua-users home
lua-l archive

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


> The other problem with this is that it's quite strange for the word "global"
> by itself to mean "don't use globals by default".

There are always other words, like "import".

function f()
    import x
    local y
    a = 4 -- illegal
end

Of course that doesn't match "local" quite so nicely and has other
connotations such as "import *" from the enclosing block.

Or maybe 

function f()
    global {}
    local y
    a = 4 -- illegal
end

would be clear?

Russ