[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Some enhancement requests
- From: Alan Watson <alan@...>
- Date: Mon, 3 Apr 2000 13:47:12 -0500
>2. The second argument to the next() function should be optional so that
> next(foo, nil) is the same as next(foo). I use next() regularly to test
> if a table is empty (if next(tab) then print"not empty" end) and the
> additional nil is disturbing and inconsistent.
Surely it would be better to use a wrapper function:
function isempty(t)
return not next(t, nil)
end
Regards,
Alan
--
Dr Alan Watson
Instituto de Astronomía UNAM