lua-users home
lua-l archive

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

On 08/01/15 10:11 AM, Marco Bambini wrote:
one of the criticisms about Lua is the way it uses globals (using an hash table instead of a regular array and so performance suffers when globals are accessed).

I just wondering what's behind that design decision, I mean what's the pro and cons of having an hash table for globals instead of a simpler array?
Thanks a lot.
Marco Bambini

How would you index it? _ENV[1]("this would print") _ENV[2]("this would return a string") etc?

Disclaimer: these emails are public and can be accessed from <TODO: get a non-DHCP IP and put it here>. If you do not agree with this, DO NOT REPLY.