|
On 15.03.2018 12:40, Viacheslav Usov
wrote:
The expectation that table.foo = nil removes foo does not only runs silent performance problems. In the case of sequences it runs into a direct incompatibility in behavior. table = { 1, 2, 3} table[#table] = nil table[#table + 1] = 42 How does table look like now? { 1, 2, nil, 42} or {1, 2, 42} depending on the undef feature used or not. Well this looks like a major incompatibility to me, and personally I would prefer a compile error over a semantical change within the same syntax. That said, I also think that table[#table] = nil should still remove the last element of a sequence for backwards compatibility only. And the new feature (sequences with holes) should get a new syntax. -- Thomas |