[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: new "empty" value/type in Lua?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 1 Jul 2013 17:44:42 -0300
> If I'm following correctly, code that uses t[k] = nil to clean up
> parts of a table would behave the same, but take up more memory,
> unless modified to use table.delete() ?
Currently, t[k] = nil does not clean up anything, so that would not be
a big difference. (OK, t[k]=nil opens the door for a future clean up,
but that depends on other things; I guess few programs actually go
to the stage of a clean up...)
Much more serious, for me, is the incompatibility that t[#t] = nil will
not "pop" elements form a list (and. of course, the extra complexity).
-- Roberto