Re:Lua 5.3: integers, bitwise operators, and a basic UTF-8 l...
by aDevilInMe on Monday January 12, 2015 @12:43PM
(#8875208)
There have been a number of bit modules developed by 3rd party developers, including LuaJIT's Mike Pall, in addition to 5.2 which had bit functions. However, the bit functions were slow and a dog to use.
Re:Lua 5.3: integers, bitwise operators, and a basic UTF-8 l...
by theseoafs on Monday January 12, 2015 @12:42PM
(#8875197)
Well, Lua is only just now getting integers. Bitwise operations don't really make that much sense when you only have access to floats.
Re:Lua 5.3: integers, bitwise operators, and a basic UTF-8 l...
by dottrap on Monday January 12, 2015 @12:48PM
(#8875240)
Additional clarification. The integer reason was the main reason it wasn't in the language, but various libraries have always been available to do bitwise operations. Lua 5.2 included a bitwise library as part of the standard library (which is now redundant and deprecated).
As a library, there were edge cases such as what if you used the number as floating point or what happens with 64-bit.
Now with integers, bitwise operations can be put directly into the language instead as a library.
Thinking about Redis bitmaps, they could be very useful when available in the scripting context/