[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.0 (work4) now available
- From: Roberto Ierusalimschy <roberto@...>
- Date: Sun, 1 Aug 2010 14:28:19 -0300
> >ipairs in work4 behaves identically to the 5.1 version. (with the
> >exception of returning nil in place of nothing)
> >
> >Is the doc wrong or the code?
> >
> >
>
> I believe the doc is wrong, since the thinking was that since ipairs
> is being deprecated there was no reason to also change its
> functionality.
The doc is wrong, but not because of this thinking (given that it is not
being deprecated any more). The problem is that, with the possibility
of tables to redefine '#', the implementation was wrong, and a correct
implementation was somewhat expensive (checking against '#' in every
iteration).
Anyway, ipairs is back with its 5.1 semtantics.
-- Roberto