[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.3.0 (alpha) now available
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 31 Jul 2014 16:08:14 -0300
> I read through the definition of "table.copy" and I don't grasp it. I
> assume that the updated reference isn't complete. The definition is:
> table.copy (a1, f, e, [a2,] t)
> Reading the text, I think that:
> a1 is source
> a2 is target. if a2 is missing then a1 is used.
> t is the target index's start, such that the first index to be copied.
> (shouldn't this default to 1 or f?)
> f is "first"?
> e is "end"?
> table.copy(source, 1, 10, destination, 5)
> would copy index 1 ... 10 into the table 'destination', starting at index 5
> Is that correct?
> Is this interface mimicking some pattern that I haven't seen before?
Not that we know. Do you suggest something else?
> I didn't find this easy to read or understand.
:( (Well, in the end you did understand it all, correctly :)