While this could be set individually on each table created, it would not work like the relationship between the String Library and the String type, which is automatic. The advantage of type metatables is that they apply automatically to all objects of that type while instance metatables have to be applied to each object on or after creation. Incidentally I find your signature quote inappropriately offensive for a public mailing list. -----Original Message----- From: Miles Bader [mailto:miles@gnu.org] Sent: 20 February 2008 13:55 To: Lua list Subject: Re: A Type Metatable for Tables? It seems like 2 could be implemented using existing Lua mechanisms: an instance metatable can just have its own metatable, with an __index entry pointing to the global table metatable. -Miles
Attachment:
smime.p7s
Description: S/MIME cryptographic signature