As the discussion of loops seems to have gone prematurely cold since
the un-deprecation of ipairs, I figure I'd resurface one of the ideas
that had been roughly proposed in the discussion: making table
traversal loops part of the core language, rather than just iterator
functions.
One type of loop would visit every key in a table once, operating
similarly to pairs():
for k, v over t do
-- code...
end
The other new type of loop would iterate from 1 to the first hole in
the table, conceptually similar to ipairs():
for i, v thru t do
-- code...
end
The advantages of this:
* Reduced overhead, likely leading to increased performance
* Simpler execution for the two most common loops
* Two less standard functions in the global namespace
The disadvantages:
* Two more forms of the "for" loop