[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: native code for bitwise operators in LUA
- From: Patrick Rapin <toupie300@...>
- Date: Wed, 2 Nov 2011 22:43:02 +0100
I do use quite a lot bitwise operators in C++.
In Lua 5.1, bit operations missed me a lot so I wrote a bit library
(instead of searching for an existent one).
So I am happy that a standard bit32 library now appears in Lua 5.2.
However, I am clearly against introducing new operators and new VM op
codes for bit operations:
- Lua has very few punctuation operators, privileging key words.
- Lua lacked bitwise operations during 18 years; I doubt that they
became suddenly so important to change the grammar for them
- Lua always favors small implementation code when possible. New
opcodes and operators are harder to introduce, and cannot be
"opted-out".
- Even MATLAB doesn't have operators for bit operations
- If you want speed, use LuaJIT