lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, May 24, 2010 at 3:29 PM, Juri Munkki <jm_list@cameraid.com> wrote:
> Ipairs allows you to add items to the list. If you evaluate the length of
> the list in a numeric loop, you can't add new items to the list within the
> loop and expect them to be looped through. Similarly, deleting items from
> a table within the loop will behave differently with ipairs and a numeric
> loop using #table.

Very good point; the obvious & naive implementations of ipairs lack
this very important property.

I think the old dog deserves another chance.  Also, the speed of
deprecation has definitely increased these days.  The old use of 'arg'
with varargs functions has hung around for years - it's a good thing
that's gone.  But the absence of ipairs could very well be a reason
for not upgrading systems to 5.2

steve d.