lua-users home
lua-l archive

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

> If nil is allowed as a table key, then next() would have to use some
> other value for the beginning and end of a table.

Actually, I never liked the fact that nil is used to signal the end of
an iteration. Whenever I build an iterator that might return nil
elements, I have to put a pseudo-index as the first return value of
the iterator as a workaround.