[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Arguments by reference?
- From: Boyko Bantchev <boykobb@...>
- Date: Thu, 1 Sep 2005 21:41:29 +0300
On 9/1/05, Ben Sunshine-Hill <email@example.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 :)