What's stopping you from making it yourself?
"Performance" is overrated. If you want performance iterating over a range of integers, allocating an enumerator object (built-in or not) is not the way to get it.
nnnik wrote:The outdated for loop you suggested would be slower when operating on arrays than the normal AutoHotkey for loop - and by a whole exponent.
would perform similarly to Loop Count
, which is not much slower than for-in on an array.For(;;)
is not outdated. It is more general purpose and lower overhead than for-in. (It is also more obscure/harder to explain to new/non programmers than Loop Count
Flipeador wrote:You can even avoid creating a temporary variable in some cases.
I guess you mean that you can avoid having to assign
i := A_Index
when using nested loops. With
for temp_variable in range(...)
, you cannot
avoid creating a temporary variable (and on top of that, a temporary object).