|
On 14/12/2010 9.39, Dirk Laurie wrote:
But now table.remove(a,3) makes #a=999? What sort of logic is that?
The logic I read in Keith's proposal is:"by assigning a value to an integer index i higher than the current #t, I declare this to be array ranging from 1 to i. Inside this array, nil is a value like any other".
The second rule is a logic consequence; it would be the only available way to shorten the array.
In a broad sense, Mark's proposal is along the same line, even if it uses a completely different approach: both are ways to 'declare' an array so that it could contain nil values.
-- Enrico