lua-users home
lua-l archive

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


Dirk Laurie <dirk.laurie@gmail.com> writes:
> <sigh> here we go again ... </sigh>

Huh?

> If compatibility with 5.2 is that crucial, why insist on writing code
> that in Lua 5.3 will return true integers? Why not just write in Lua
> 5.2 and trust the developers to provide a compatibility option?

The thing that prompted the exploration of this was that "tostring" in
Lua 5.3 returns something different for floats than it does for
integers, even for floats with integer values, and I had some code
that got confused by that.  This code uses floor(a/b) to get that
value, and I changed it to use ifloor but along the way, realized that
for some uses it might be nice to directly use "//" for efficiency
reasons (e.g. Roberto's earlier post about changing some code to use
"//").

-miles

-- 
Inhumanity, n. One of the signal and characteristic qualities of humanity.