[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: what to make of this fellow named __ipairs?
- From: "E. Toernig" <froese@...>
- Date: Thu, 27 Jan 2011 22:57:22 +0100
Tony Finch wrote:
> One of the significant oddities in Lua is the distinction between methods
> called using the : operator and metamethods called by the language runtime
> and some library functions.
> However I don't think it can keep backwards compatibility without
> sacrificing efficiency. The key change is a version of the old idea of
> making the lookup algorithm for : different from . which allows more
> natural support for class-style OOP by making it easy to separate instance
> variables from methods.
Not only instance variables, data too (if the instance is the container
for arbitrary data).
I'm advocating for a change to the colon operator for nearly 10 years
and I've given up by now.
 i.e. http://lua-users.org/lists/lua-l/2001-11/msg00459.html