[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: use of gettop to change functionality
- From: Michal Kottman <k0mpjut0r@...>
- Date: Tue, 01 Mar 2011 21:28:42 +0100
On Tue, 2011-03-01 at 15:21 -0500, Patrick Donnelly wrote:
> I really hope programs like this do not become common. Making a new
> garbage table on every insert?! This is why I advocated having
> table.pack accept a table argument...
I personally wouldn't like to have to write 'table.pack({}, ...)' every
time I wanted to pack the arguments into a new table.
On the other hand, having the table argument optional (either first, or
last) is not an option, because what would happen here?
function f(...)
local t = table.pack(...)
end
f({})
Is the first argument a table that I want to fill, or an argument?