lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


----- Original Message ----- From: "Eike Decker"


Undefined behaviour means, that you might not iterate over all values in your loop for instance. I have no detailed information how the tables are working, but I guess (no idea if this is right!) the behaviour becomes undefined, when
the table is resized during traversial.


Eike

The current implementation leaves it undefined well before the table gets resized. Eg, sometimes the table will visit the new key as part of the traversal, and other times it won't. (Depending on whether or not the new key was inserted after or before the current position in the traversal). You're right about everything in your post though I believe :)

- Alex