4 ms·
Well, Lua is only just now getting integers. Bitwise operations don't really make that much sense when you only have access to floats.
by theseoafs 12y ago
Well, Lua is only just now getting integers. Bitwise operations don't really make that much sense when you only have access to floats.
- dottrap 12y agoAdditional 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.