Hello!
On Mon, Apr 4, 2016 at 11:04 AM, Robert Paprocki wrote:
> I'm a bit unclear on how table.new() is implemented and should be used. My
> understanding is the behavior mirrors the C call lua_createtable:
>
> "The new table has space pre-allocated for narr array elements and nrec
> non-array elements."
>
Yes.
> Can someone explain the difference between array elements and non-array
> elements in this context? Does this refer to the table being indexed by an
> integer vs. indexed by, say, a string or sub-tab, e.g., tab[1] vs
> tab["foo"]?
Yes. Essentially like that.
Regards,
-agentzh