lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 1 August 2014 10:48, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
>  [...] However, I am not delighted
> by an optional argument preceding a non-optional one. [...]

We do not like it either. Do you suggest any alternative?

-- Roberto


I see no problem saying making the function signature

    table.icopy(from_tbl, from_idx, num_elements, [to_tbl, to_idx])

If to_tbl and to_idx ar not given, they default to the empty table and 1.
The function always returns to_tbl.