lua-users home
lua-l archive

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




On 14/04/15 08:58 PM, Luiz Henrique de Figueiredo wrote:
Why do we not have an __unindex metamethod, that gets called when a
key gets set to nil (either by GC or manually (including rawset))?
If you need control over set and get events for a table, use a proxy table.

In any case, rawset is for *raw* access, so no metamethods are called.

We have __gc already, I don't think anyone would mind another "special" metamethod. (__unindex would be kinda like __gc but for table keys)

--
Disclaimer: these emails are public and can be accessed from <TODO: get a non-DHCP IP and put it here>. If you do not agree with this, DO NOT REPLY.