[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Metamethod when removing an index from a table?
- From: "Paul Hudson" <phudson@...>
- Date: Tue, 6 Jun 2006 12:47:58 +0100
>> I can check for the metamethod and return to the original pairs etc
>> implementation pretty quickly...
>Or you can store the actual table in the proxy and make pairs and friends
>work on the actual table when handed a proxy. Easy to do in Lua and fast
Yes, that's more or less what I meant (the only way I know I've got a proxy
is to look for the metatable or metamethod). But checking for __next is more
general (allowing, e.g. tables where pairs() orders the keys)