lua-users home
lua-l archive

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


On Tue, Nov 14, 2017 at 11:47 AM, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:

> If you apply the rules for arithmetic and comparison operations over mixed numbers, explained elsewhere in the manual, you have the semantics of mixed-number loops. What exactly do you think is missing?

My impression was that the original poster was unhappy about the "var > limit" condition, which, when limit is the max positive integer (or a larger floating point value), can never be satisfied. This is not obvious and arguably unexpected by programmers. Personally, I agree that having to consider that an intermediate value can overflow and derail the computation requires a discipline that would be difficult to instil upon myself or others.

Cheers,
V.