lua-users home
lua-l archive

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


This results in an endless loop. Why not check step for zero?

I can think of at least three reasons:

1) Loops are the most important things to optimize for performance. Any superfluous checks should be avoided.
2) "while true do end" does not throw an error.
3) "for i = 1, 1+e, e/2 do end" also does not throw an error. (Where e is the epsilon of lua_Number, ie the difference between 1 and the "next number" after it, for a given precision)

- Alex