On Wed, Dec 31, 2008 at 5:17 PM, Benjamin Tolputt wrote:
On 12/31/08, Lee Hickey wrote:
http://julien.danjou.info/blog/index.php/post/2008/12/30/Rants-about-Lua
I don't understand why the '#' syntax does not use the __len metamethod
[snip]
From the blog:
The problem is that standard functions like table.insert or
table.remove do raw accesses to the table.
Therefore, I question why table.* functions should honor metamethods.
If you want your ADT to have an "insert" operation, you could
implement it as a dynamically bound method:
[snip]