[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Newbie questions regarding luasocket, tables
- From: Shmuel Zeigerman <shmuz@...>
- Date: Tue, 08 May 2007 13:11:11 +0200
It seems like there is no quick way to determine the number key-value
pairs in an associative table (short of iterating through and counting
them all). If I am not missing something, why is there no quick way
to determine the number of key-value pairs in an associative table?
Perhaps the C implementation of Lua counts the number of pairs as they
are added and removed, but this count is not exposed in Lua?
Or does the C implementation not even count the number of pairs in a
table? If not, why not? This would seem to be a very useful number
to have quick access to.
I'd also like to know the answer to this question.