lua-users home
lua-l archive

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


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