[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.3.0 (work2) now available
- From: Paul Baker <paulbaker8@...>
- Date: Wed, 26 Mar 2014 05:20:02 +1300
Thank you for this release, I very much look forward to using it. I
often need to do low-level bit manipulation and similar things in Lua
and the new features in 5.3 (particularly integers, bitwise operations
and pack/unpack) will be very useful for this. However, looking into
the details of these new features raises at least one question:
Regarding the new bitwise operators, the Reference Manual states "Both
right and left shifts fill with zeros the vacant bits". Given that
"Lua 5.3 has integers but not unsigned integers" [1], it seems strange
that the >> operator is unsigned rather than signed. Is there a reason
for this? Personally, I think it would be useful for Lua to support
both types of right shift - perhaps using the same syntax as
JavaScript: >> and >>> ?
[1]: http://lua-users.org/lists/lua-l/2014-03/msg00684.html