lua-users home
lua-l archive

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


On 1/4/2011 9:18 PM, Leo Razoumov wrote:
On Wed, Dec 29, 2010 at 10:31, Luiz Henrique de Figueiredo wrote:
Let's not get into this discussion again: #t does not return anything useful
if t is "an array with holes".

There is a good reason why this question persistently comes up again and again.
Lua provides no good way to test whether a given array has holes or
not. Most of the time one relies upon leap of faith to trust #t
values. In that regard Lua quite successfully bridged a gap between
Coding and Religion:-)

Faulty applied programming. When did programming involve a leap of faith? Try telling that to developers of aviation software.

Use #t conservatively, according to its specifications.

This advice has been repeated by many others in recent past postings.

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia