[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: documentation: metatable is a reference (refman is unclear)
- From: Dirk Laurie <dirk.laurie@...>
- Date: Sun, 7 May 2017 12:18:35 +0200
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,.