Originally Posted by Aezay
To save a function call, many uses next() as the iterater in a for loop, why not do the same for ipairs(), should be easily obtainable using this code. Or is there an iterator function already available for array type tables, like next?
This would probably be quite silly normally, unless it's code run often like in an OnUpdate script.
Code:
local iterator = ipairs(_G);
|
I think I've seen maybe one or two people use next, I'm not sure I would call it common at all. This gets into premature/unnecessary optimization