[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Tail-call regression from Lua 5.3 to 5.4
- From: v <v19930312@...>
- Date: Sun, 27 Aug 2023 20:14:45 +0300
On Sun, 2023-08-27 at 19:09 +0200, bil til wrote:
> ... I hope this question is not too stupid, but where do you see a
> "to-be-closed" variable here? (as the keyword <close> is not used
> anywhere?)
Generic for loop implicitly introduces one in Lua 5.4. Quoting
reference manual:
> The loop starts by evaluating explist to produce four values: an
iterator function, a state, an initial value for the control variable,
and a closing value.
...
> The closing value behaves like a to-be-closed variable (see §3.3.8),
which can be used to release resources when the loop ends.
--
v <v19930312@gmail.com>