lua-users home
lua-l archive

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

On Sat, Jan 09, 2010 at 12:52:33PM +0300, Alexander Gladysh wrote:
> On Sat, Jan 9, 2010 at 12:37, steve donovan <> wrote:
> > 2010/1/9 Ignacio Burgueño <>:
> >>> 17. Documented behaviour of ipairs() is changed from "iterates until
> >>> *first nil*" to "traverses table length elements as defined by length
> >>> operator".
> > This is more consistent, but given how strange #t is when t has a
> > number of holes, it isn't necessarily more useful.
> (1) Don't have holes in tables you want to measure with #, that's all.

That's why this change to rely on #t is completely beyond me.

I fail to see how breaking perfectly valid code
by trading a well defined behaviour for all tables
for something undefined on "arrays with holes" does any good.