[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: __newindex rawsetless semantics?
- From: "Thiago L." <fakedme@...>
- Date: Tue, 14 Oct 2014 08:42:26 -0300
Hi,
I guess you can claim this is a proposal but I also want feedback on it...
The idea is new semantics for __newindex so you can use it without rawset():
function __newindex(t,k,v)
if condition then
return k,nv
elseif othercondition then
return nk,v
elseif anothercondition then
return nk,nv
else
return k,v
end
end
Unless your __newindex returns junk, this shouldn't break anything.
Thanks.