[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: The __newindex metamethod
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 11 Jan 2011 08:29:56 +0200
On Tue, Jan 11, 2011 at 8:21 AM, Mark Hamburg <email@example.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
I think __methindex allows genuinely new behaviour - that is, the
ability to make method lookup distinct from field lookup.