lua-users home
lua-l archive

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

One subtlety that just dawned on me and I don't think was called out previously in the discussion. Under this proposal, all functions in a compile unit share the same environment value unless they explicitly introduce a new local _ENV variable. This means that the current semantics of setfenv cannot be reproduced with the new proposal. Is that a misunderstanding on my part? Did I just forget that this point was raised? I don't know that this is a "flaw" per se, but it might matter to people who use setfenv more aggressively (though since setfenv isn't friendly toward re-entrancy or coroutines, I wouldn't expect it to be being used aggressively).