[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua, LuaJIT2 and differences with the length operator
- From: KHMan <keinhong@...>
- Date: Tue, 04 Jan 2011 21:34:48 +0800
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.
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia