lua-users home
lua-l archive

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


On 9/1/05, Ben Sunshine-Hill <sneftel@gmail.com> wrote:
> The semantics for a table reference, actually, are pretty much
> the same as those of a C pointer

So, in the end, passing tables is like passing arrays in C
(i.e., copying references, only not having to consider explicit
references anywhere in Lua)?

>From the previous explanations by Rici I somehow got the idea
that passing a table differs from just passing its reference,
probably because some other accompanying (but hidden)
information is not copied... now it seems I got him wrong.

If there isn't such a thing, and if I was right to assume that
it is the reference (pointer) that is copied, then it would be
sufficient to clarify this by pointing out to the analogy with C.
After all, it is not unreasonable to assume that all here use C :)

B.