[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.3.0 (work1) now available
- From: Todd Coram <todd@...>
- Date: Wed, 10 Jul 2013 12:46:46 -0400
On Wed, Jul 10, 2013, at 11:29 AM, Roberto Ierusalimschy wrote:
> > > That's one reason their choice of semantics for overflow are really
> > > pretty nice.
> >
> > Yes. In fact, I can't think of any use of full 64-bit unsigned integer that won't "work just fine." We can even read and write them:
> >
> > [...]
>
> Comparison does not work for unsigneds, but we could add a function for
> unsigned comparison.
>
> -- Roberto
>
And, even with having to write functions to get around the sign bit, a
int64 type is still a huge improvement over the (potential) lost of
precision caused by using floating point to manipulate 64 bit values.
IMHO, Int64 is a very big deal (for Lua). The 53 bits of mantissa is
sufficient for a lot of applications, but I feel dirty every time I deal
with a protocol format that specifies a 64 bit field and I shove it into
a Lua (5.1/5.2) number: One day, someone will have a reason for using
all 64 bits in that field and my Lua app will munge that value.
/todd
- References:
- Re: [ANN] Lua 5.3.0 (work1) now available, Enrico Colombini
- Re: [ANN] Lua 5.3.0 (work1) now available, Roberto Ierusalimschy
- Re: [ANN] Lua 5.3.0 (work1) now available, Lorenzo Donati
- Re: [ANN] Lua 5.3.0 (work1) now available, Roberto Ierusalimschy
- Re: [ANN] Lua 5.3.0 (work1) now available, Lorenzo Donati
- Re: [ANN] Lua 5.3.0 (work1) now available, Joseph Manning
- Re: [ANN] Lua 5.3.0 (work1) now available, Todd Coram
- Re: [ANN] Lua 5.3.0 (work1) now available, William Ahern
- Re: [ANN] Lua 5.3.0 (work1) now available, Miles Bader
- Re: [ANN] Lua 5.3.0 (work1) now available, Doug Currie
- Re: [ANN] Lua 5.3.0 (work1) now available, Roberto Ierusalimschy