[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Strong tables in Lua 5.4
- From: Dibyendu Majumdar <mobile@...>
- Date: Mon, 19 Mar 2018 19:47:20 +0000
On 19 March 2018 at 19:08, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
>> Every `t[k] = f()` of every module and dependency (and their
>> dependencies recursively) would have to be checked for memory leaks.
>> And this won't be the typical Lua 5.x to Lua 5.(x+1) situation where
>> you try out a dependency on a new Lua version and it doesn't) build
>> because lua_dump now has an extra argument, or lua_objlen was renamed
>> to lua_rawlen in a Lua/C module, or you get a crash with a stack trace
>> in your testsuite because setfenv() doesn't exist anymore.
>
> I still think you are exaggerating the problem, but I may be wrong.
I think the problem Hisham is referring to is quite obvious (or maybe
not as I missed it too)?
t = {1,2, nil, 3}
for k,v in pairs(t) do
print(k,v)
end
Isn't the issue that existing code does not expect nil to appear while
iterating?
Regards
Dibyendu