lua-users home
lua-l archive

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


2017-05-07 12:02 GMT+02:00 nobody <nobody+lua-list@afra-berlin.de>:

> (unless I fail at searching), the reference manual does not explicitly
> state that metatables are "stored" by reference.  (I.e. `setmetatable`
> doesn't copy the thing passed as metatable, but puts a reference to it
> in a suitable location.)

There simply is nothng else in Lua except copy by reference.
Not even a table copy library function in a library.

> Should this be clarified?  (Judging from a recent question on SO, this
> has the potential to confuse some people coming from other languages.)

Please write a little document entitled "Lua for XXX programmers"
aimed at such people and post it on the list. i don't think the Lua team,
widely read though they are, can be expected to ancipate the sort of
remedial instruction that might be needed in various plausible cases,.