lua-users home
lua-l archive

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


Sorry, I did not understood your comment. Can you please elaborate?

Rafael - SosCpdTerra escreveu:
Snapshots. Now I see use to the static random* response.

-----Mensagem original-----
De: lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br] Em nome de Philippe Lhoste
Enviada em: quinta-feira, 5 de julho de 2007 11:15
Para: lua@bazar2.conectiva.com.br
Assunto: Re: Table boundaries

On 05/07/2007 15:29, Luís Santos wrote:
  
Isn´t it confusing?
    
Confusing, perhaps, but it still have some logic...
This allows to manage hollow tables (few values scattered in a big range 
of indexes) efficiently, while managing full tables (almost all indexes 
having a value) efficiently too (numerical indexes instead of hashed ones).
I believe that Lua is able to smartly switch from the first type to the 
second, which is a good thing.
You can still pre-fill your array with 0s if you want your table to act 
like a classical array in most other languages.

  

--
Luís Eduardo Jason Santos
Coordenador Técnico
IT Quality Systems
lsantos@itquality.com.br
[21]2242-7959 ramal 49