lua-users home
lua-l archive

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


Right, this is indeed my assumption, i.e. a dynamic scope much akin to, well, get/setfenv... Pure speculation though :)

If it's not, then, well, hmmm, I'm a bit at a loss about the usefulness of that mysterious new "in" clause. Oh, well... will see how this pans out once more details leak out of Rio.

I wish there was support for dynamic scoping, too...
But currently language specifies environments, along with upvalues and
metatables as properties of values. Dynamic scoping would change
environment into an implicit argument.

However, new code still looks possible enough to modify to support 0 as the
function environment, and propagating active environment in the
CallInfo structure (i.e. if function environment is nil, then use the one
passed from parent). If I get around to do this sometime...

But I'm feeling 98% sure "in nil do ... end" never will become valid Lua.