lua-users home
lua-l archive

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


On Tue, Jan 11, 2011 at 8:21 AM, Mark Hamburg <mark@grubmah.com> wrote:
> There are certainly arguments for a metamethod that gets invoked on every write instead of just on writes to undefined keys.

But as long as the proxy pattern works, then such a metamethod is an
optimization. And slowing down all table writes is not such a good
trade-off.

I think __methindex allows genuinely new behaviour - that is, the
ability to make method lookup distinct from field lookup.

steve d.