[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lists with nil play nice for Lua 5.2
- From: "David Burgess" <dburgess@...>
- Date: Sun, 29 Jul 2007 09:49:47 +1000
John Belmonte wrote:
> .. Lua nil is a first class value--
> an incredibly useful one-- which should not render lists practically
> useless. ..
I agree with point that John makes. I also agree that using false
instead of nil goes someway to resolving the issue. I have even
used lightuserdata (char*)NULL to represent non-existence in
tables. However, I think Lua should move to providing a length
(#) operator that always "works" for arrays and iteration that always
"works" for arrays (sparse or otherwise). Is is tough to explain
the current behaviour to the novice Lua user.
db