[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: questions on tables
- From: spir <denis.spir@...>
- Date: Tue, 24 Nov 2009 10:12:08 +0100
Hello,
-1- How does lua map keys to values?
More specifically, how does it keep the hash value constant when a key is modified:
t1 = {1,2,3}
t = {[t1]=1}
print (t[t1]) --> 1
t1[1] = 0
print (t[t1]) --> 1
What is the hash value based on?
-2- How often does it happen to mix indexed and key-ed values in a table?
(I mean in real-life programming.)
-3- How often does it happen to have string keys which are not kind of names?
(ditto)
-4- How often does it happen to have keys which are neither strings nore integers?
(ditto)
Denis
________________________________
la vita e estrany
http://spir.wikidot.com/