lua-users home
lua-l archive

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


> Agreed. The only reason #t has its undefined behavior is because it is
> impractical for it to iterate the table.

I disagree. In my point of view, there is no sensible semantics for #t
when the table has holes.

Consider the "lists" below and think what should be their length:

  {1, 1, nil, 1, 1, 1, 1, 1, 1, 1, 1}
  {1, 1, nil, 1}
  {1, 1, nil, 1, nil}
  {nil, nil, nil}
  {[100000] = 1}

-- Roberto