lua-users home
lua-l archive

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


* steve donovan:

> So, what ultimately _is_ the array part?  What is the least suprising
> definition?

Arrays ae nil-terminated tables, with indices starting at 1 (not
entirely unlike C strings).  Storing a nil value into an array has
undefined results.

A couple of weeks ago, I caught up with several months of mailing list
postings, and I noticed that this particular topic (storing nils in
arrays) reoccurred pretty often.  I don't think that Lua's behavior is
improper, but it seems to puzzle users quite a bit.  In this light,
more predictable behavior would likely make the language easier to
use.