lua-users home
lua-l archive

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



On Apr 07, 2006, at 00:27, Mark Hamburg wrote:

on 4/6/06 8:17 AM, David Jones at drj@pobox.com wrote:

"for k,v in pairs{...}" is not quadratic, but it isn't fast.

It's also incorrect if you care about nils or order. Ipairs is incorrect if
the arguments can contain nils.

Of course you're right.  Those damn nils again.

The set of cases where nils matter when iterating over varargs is probably
small, but it is potentially an issue.

Agreed.  That makes me want apairs in the standard base library.

drj