[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: question on _ENV
- From: Andrew Gierth <andrew@...>
- Date: Thu, 21 May 2020 18:31:15 +0100
>>>>> "Coda" == Coda Highland <chighland@gmail.com> writes:
Coda> The advantage is exactly the same thing: it uses the standard
Coda> language mechanisms instead of poking at the function internals,
Coda> and it ends up also being a little more flexible and I think a
Coda> bit more elegant in the implementation.
Also, when sandboxing, getfenv/setfenv have to be removed from the
sandbox or basically rewritten (since a Lua caller can do basically
unlimited damage with them) whereas _ENV in a sandbox works exactly as
normal without introducing any issues or exposing anything.
--
Andrew.