lua-users home
lua-l archive

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


> In Lua 5.2 there is nothing to stop one giving _ENV keys which
> cannot be identifiers;

Nor in any version in Lua. Even when globals were not stored in a Lua
table this was already true.

> for example
>   _ENV[_ENV] = {_ENV = _ENV}

What does that do?

> But are there any circumstances in which such licence is useful?

My arithmetic expression library ae caches whole expressions as
global variables to avoid recompiling them.