[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: what to make of this fellow named __ipairs?
- From: Javier Guerra Giraldez <javier@...>
- Date: Thu, 27 Jan 2011 10:01:48 -0500
On Thu, Jan 27, 2011 at 9:43 AM, Tony Finch <email@example.com> wrote:
> Method calls on tables without metatables work as at present.
at present, there are no 'method calls on tables' they're just calls
to table items that happen to be functions.
your proposal would mean the language have to distinguish the 'kind'
of lookup according to the 'intent': was it a 'simple' table lookup?
is it a 'method call'? is that table a metatable, so we need 'simple'
semantic even if we intend to call the method?
i _vastly_ prefer to have well-specified semantics. the difference
between '.' and ':' is a feature, not a kludge, it allows the
programmer (not some confusing context rules) to specify exactly what
semantic it needs.