[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Table enumeration order with integer indices
- From: Francisco Olarte <folarte@...>
- Date: Thu, 17 Aug 2023 10:27:45 +0200
Yan Li:
On Thu, 17 Aug 2023 at 09:47, Yan Li <yl.mechanize@gmail.com> wrote:
> The preconditions to operate a table :
...
> So with these same preconditions to operate a table, will pairs(t) produce the same enumeration?
> If the answer is yes, Is it possible to make it landing on lua document(for `next` document) ?
Current computers and hash tables will make this happen unless you do
something like perturbing each hash table with different ( random? )
values ( to avoid things like DoS attacks, or whatever ). But the
point is, if it is specified the implementor denies himself the
possibility of making it work in another way ( although lua makes
backwards compatibility breaking changes every now and then ), so, why
do it? Is there any utility for this property?
Francisco Olarte.