lua-users home
lua-l archive

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



On 1 Sep 2005, at 19:41, Boyko Bantchev wrote:
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.


The problem with passing by stating that it's passed by reference is that there's the implication that this also confers in out status on the parameter. This is the case in C, however, it is *not* the case in Lua.

The easiest way to think of it is that all Lua parameters are only in parameters - at this point, the distinction between whether it was by reference or by value becomes mostly irrelevant.


After all, it is not unreasonable to assume that all here use C :)

It may be worthwhile, but any which way, such a comparison is unclear.