[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Coroutine __close metamethod proposal
- From: Andrew Gierth <andrew@...>
- Date: Fri, 31 May 2019 13:51:32 +0100
>>>>> "Philipp" == Philipp Janda <siffiejoe@gmx.net> writes:
Philipp> And maybe functions should have a default toclose behavior as
Philipp> well.
The ability to use a function as a toclose value previously existed, but
was removed - I guess (from the timing) as a result of a discussion I
had on the list about how a restricted environment needs control over
what happens in error handling.
As it stands, if an environment doesn't expose setmetatable() to the lua
code, then it can ensure that the lua code can't get control over error
handling other than with pcall, which the environment can intercept.
--
Andrew.