> for k,v in pairs(t) do print(k, v) end
1 nil
2 nil
3 nil
4 nil
I think we're going to need a considerable amount of time to understand these "nils" everywhere.But, could the (new) undef syntax
t[i] = undef -- remove a key from a table
t[i] == undef -- test whether a table has a key
t[i] ~= undef -- test whether a table has a key
Any other use of 'undef' gives a syntax error.
be tied to the removal of the key/values, if possible (not referenced by something)? maybe, to put the key/value in a high priority (newest always) generation (from the new generational gc), such that we could have a more deterministic memory management. Then, the (new) syntax could be extended to non-tables