|
On 9/14/2016 2:16 PM, Miroslav Janíček wrote:
On 14 Sep 2016, at 16:04, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote: ... Note that any table has at least one border. Note also that keys that are not a non-negative integer do not interfere with the notion of borders.Are these two notes correct? It seems to me that a table with non-nil values for all positive integer keys {1 … math.maxinteger}, *and* a non-nil value for the key (math.maxinteger + 1) would not have a border.
I'm not sure there are practical versions of Lua where that table could actually exist. It would have to be built with a small enough integer type that a table with half of all possible integral keys could fit within (virtual) memory.
That said, I'm not certain that the definition of sequence cares about whether the keys are specifically integer type numbers. So the number math.maxinteger will be 2^63-1, and 2^63 can be exactly represented in 64-bit float. 2^63+1 cannot, and that is probably where the fuzzy non-border happens.
-- Ross Berteig Ross@CheshireEng.com Cheshire Engineering Corp. http://www.CheshireEng.com/ +1 626 303 1602