lua-users home
lua-l archive

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


On 03/12/2010 15.43, Roberto Ierusalimschy wrote:
Maybe; it could be 3 too. It is impossible to know whether you are
erasing element t[3] or simply changing its value to nil ;) After all,
the whole point is to allow nils into arrays. (With no nils, the
current # works fine.)

I find it really hard to understand this need to have arrays behave as non-arrays, especially when it's easy to make a "holed array with non-nil counter" (assuming it could somehow be useful) using newindex.

--
  Enrico