[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [NoW] Once more about to-be-closed variables
- From: Sean Conner <sean@...>
- Date: Wed, 3 Jul 2019 02:19:27 -0400
It was thus said that the Great Egor Skriptunoff once stated:
>
> IMO, "to-be-closed variable accidental assignment alert" should be moved
> from Lua core into external software (such as luacheck)
> Besides, it would be useful to have non-constant to-be-closed variables
So, what exactly should happen in this code?
local <toclose> f = io.open("a")
local x = f
f = io.open("b") -- should 'a' be closed? or not because of x
f = io.open("c") -- should 'b' be closed?
-spc (Trying to pin down semantics here ... )