lua-users home
lua-l archive

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


Nick Gammon wrote:
On 19/11/2010, at 2:14 PM, dcharno wrote:

What is the motivation for the ALL CAPS function names in the bit library?


My guess it is to avoid the use of the reserved words "and" and "or".
However it does look UGLY.

Mark me down as a "me too" as well. My implementation of Lua for
LEGO MINDSTORMS used to have a separate set of bit operations in
a table, with names like "band" "bor" "bxor" etc.

I was glad to see these names in the early 5.2-workX releases, and
was also glad that it worked just fine with my modified luaconf.h
that uses unsigned long as the Lua numeric type on ARM7

If you are at all flexible on the names, then I prefer bit.band over
bit.AND

Ralph