[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua 5.3: wrong coercion?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 16 Jan 2015 19:38:27 -0200
> Is there a reason why the coercion first recognizes the string as
> representing an int and then "throws away" that info and converts it
> unconditionally into a float?
We want a fast track for integers, so the first check is simply whether
both operands are integers. After that check, it is too cumbersome to
recheck whether the strings are "integers" and then also do an integer