lua-users home
lua-l archive

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


William Ahern <william@25thandClement.com> writes:
> One quibble: most protocols sanely use unsigned integers. A signed 64-bit
> integer is 1 bit too short, and generally speaking you're not much better
> off than with floating point doubles and the bit32 library.

It sort of depends on what you're doing with them.  For many uses,
even if the "real" type is an unsigned integer, a signed integer with
guaranteed twos-complement overflow/wraparound behavior (as in Lua
5.3) will work just fine.

That's one reason their choice of semantics for overflow are really
pretty nice.

-miles

-- 
Patience, n. A minor form of despair, disguised as a virtue.