[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: upcoming changes in Lua 5.2 [was Re: Location of a package]
- From: Ignacio Burgueño <ignaciob@...>
- Date: Thu, 21 Feb 2008 11:05:28 -0300
Jérôme Vuarand wrote:
2008/2/19, Roberto Ierusalimschy <email@example.com>:
Roberto, is there any description of upcoming changes in Lua 5.2?
There is no "official" roadmap :) The following is a list of what we
have been doing.
We have already implemented several small changes:
- "metamethods" __pairs & __ipairs
Why is the new ipairs using an __ipairs metamethod rather than the
existing __index ?
First, I think that the above would be a very welcomed addition to Lua.
Second, in my opinion, __index and __ipairs (whatever the final
semantics may be) are not comparable. __index is triggered on access to
non-existent keys and __ipairs would be used to redefine the way an
array-like table is iterated, right?
Also, using the same metamethod for both cases will make it hard to
distinguish when you're indexing a table and when you're going to