lua-users home
lua-l archive

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

> My opinion is that all proposed operators to get the length of a table
> too cryptic to be used with a language with an intuitive syntax as
Lua. A
> more intuitive length operator, at least for me, is |t|. Of course |s|
> could also be used to get the length of a string.

Why do we need a length operator? And anyway, how do you determine the
length of a table? It's implementation specific. Do you count the number
of key-value pairs, the highest numeric key, the number of numeric keys

Look at the getn docs etc.