[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Why do we not have an __unindex metamethod?
- From: "Soni L." <fakedme@...>
- Date: Tue, 14 Apr 2015 21:42:50 -0300
On 14/04/15 08:58 PM, Luiz Henrique de Figueiredo wrote:
We have __gc already, I don't think anyone would mind another "special"
metamethod. (__unindex would be kinda like __gc but for table keys)
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.
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.