[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: ipairs in Lua 5.3.0-alpha
- From: Dirk Laurie <dirk.laurie@...>
- Date: Sat, 16 Aug 2014 09:05:26 +0200
2014-08-15 20:37 GMT+02:00 Jan Behrens <jbe-lua-l@public-software-group.org>:
> My question is now (disregarding any implementation
> issues):
>
> "What shall ipairs be in Lua 5.3?"
The present version (Lua 5.3.0 alpha) is: iterate from 1 to #tbl,
respecting both __len and __index. However, #tbl is evaluated
only once, so you need to know it before you start.
Sorry, the following is somewhat off-topic, and bikeshedding, both
of which I hate :-)
What I am starting to miss more and more in Lua is for the
space just before `do` in a `for` statement to be utilized:
for k,v in ipairs(tbl) while ok(v) do
end
and
for k,v in pairs(tbl) if ok(v) do
end
- References:
- Speed of # operator (Was: ipairs in Lua 5.3.0-alpha), Dirk Laurie
- Re: Speed of # operator (Was: ipairs in Lua 5.3.0-alpha), Enrico Colombini
- Re: Speed of # operator (Was: ipairs in Lua 5.3.0-alpha), Jan Behrens
- Re: Speed of # operator (Was: ipairs in Lua 5.3.0-alpha), Roberto Ierusalimschy
- Re: ipairs in Lua 5.3.0-alpha, Jan Behrens
- Re: ipairs in Lua 5.3.0-alpha, Jan Behrens
- Re: ipairs in Lua 5.3.0-alpha, Roberto Ierusalimschy
- Re: ipairs in Lua 5.3.0-alpha, Jan Behrens
- Re: ipairs in Lua 5.3.0-alpha, Jan Behrens
- Re: ipairs in Lua 5.3.0-alpha, Roberto Ierusalimschy
- Re: ipairs in Lua 5.3.0-alpha, Jan Behrens