Yes Roberto I know and I agree with you. I just would like to know what are the main advantages of the hash usage in terms of flexility.
I guess loading code at runtime for example (it can load globals without knowing much details about it)... but I am sure there should be something more.
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 think this is an unfair (or more likely an uninformed) criticism. Practically any dynamic language uses something like hash (or worse) to access global variables. -- Roberto
|