[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: native code for bitwise operators in LUA
- From: Dirk Laurie <dirk.laurie@...>
- Date: Thu, 3 Nov 2011 12:00:51 +0200
2011/11/2 Luiz Henrique de Figueiredo <email@example.com>:
> the bit32 library is meant to make bit manipulation possible in Lua, not to make it fast.
That is an important point. But the point in a previous thread about
operators corresponding to metamethods __and, __or, __xor and __not,
which could be supplied for some objects (arrays were mentioned) fits
in very nicely with their mapping to bit.band, bit.bor, bit.xor and
bit.bnot. The other bitwise operators (shifts and rotates) do not
appear to be as generally useful.