[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: use of gettop to change functionality
- From: Patrick Donnelly <batrick@...>
- Date: Tue, 1 Mar 2011 18:16:00 -0500
On Tue, Mar 1, 2011 at 4:01 PM, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
>> [...] This is why I advocated having
>> table.pack accept a table argument...
>
> The problem is that this argument cannot be optional, and the use of
> table.pack({}, ...) is not as good as the original version, as the
> table is created with size 0 in this case.
>
> Maybe 'table.pack(nil, ...)' could mean 'create your own table', but
> that is ugly...
Maybe it's ugly but it would be far more beautiful than the
workarounds using select.
Maybe make a different function like table.append(t, ...)?
--
- Patrick Donnelly