lua-users home
lua-l archive

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


----- Original Message ----- 
From: "Tom Spilman" <tom@sickheadgames.com>
To: "Lua List" <lua@bazar2.conectiva.com.br>
Sent: Wednesday, June 25, 2003 9:56 PM
Subject: table.copy


>     Is there a reason why there isn't a table.copy( table ) function in
the
> standard library?  Tom
>

The reason is, there are many ways to copy a table, and you cannot define a
simple "standard" way.

An example is: How is table recursion handled? The way you want to deal with
this is application dependant. Another example is userdata: A reference copy
may not be the desired thing to do.

It's simple to write a function of your own, and there are also several
mailed to this list, just search.