[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Metatables are "hard" (Re: Question about __index and classes)
- From: Tony Finch <dot@...>
- Date: Thu, 1 Sep 2011 18:56:12 +0100
Mark Hamburg <mark@grubmah.com> wrote:
> This thread plays a bit to a message I started a while ago and never
> finished. Metatables are "hard" -- particularly for people coming from
> backgrounds in OOP languages.
I agree with what you said but you missed out one important point: the way
that methods of the obj:meth(args) kind are looked up is completely
different from the way metamethods are looked up. Other languages tend to
make user-defined and language-level methods look the same.
Tony.
--
f.anthony.n.finch <dot@dotat.at> http://dotat.at/
Humber, Thames: East or southeast 4 or 5 veering south 3 or 4. Slight or
moderate. Fair. Good, occasionally poor later.