lua-users home
lua-l archive

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

Except for one - metatable. The most 'shallow copy' way is to keep the same metatable, but it may be good to make an exception: if the original table is its own metatable, the new table should also become its own metatable.

----- Original Message ----- From: steve donovan
To: Lua list
Sent: Friday, November 13, 2009 4:38 PM
Subject: Re: little questions

On Fri, Nov 13, 2009 at 12:33 PM, Thomas Lauer <> wrote:
It's not that easy. First, Idle only ever creates a metatable and
initialises __index for tables created via an explicit call to Tables created via t={} are plain tables w/o a metatable.
So there's a choice to start with.

Sorry, Thomas, then I misunderstood. Having it explicit removes all objections.

steve d.