lua-users home
lua-l archive

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

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 >>> ?