lua-users home
lua-l archive

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


On Thu, Jan 27, 2011 at 9:43 AM, Tony Finch <dot@dotat.at> 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.

-- 
Javier