lua-users home
lua-l archive

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

> To simply solve the non-determinism problem, there are at least the
> following options:
> 1 - the number of numeric (integer?) keys
> 2 - the total number of keys
> 3 - the largest numeric (integer?) key
> 4 - the smallest integer key k such that all keys 1..k are present

Why doesn't Lua offer ways to get exactly such results? Like 4 ways to
get the length of a table? The # operator should be one "default" case
and for others, we could forward to some function.

I find these reoccurring threads a bit annoying (it's really quite
regularly picked up) and I think it shows a shortcoming of Lua itself.
But this was discussed thoroughly in previous threads... (probably
also my question, forgive me ;))