lua-users home
lua-l archive

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



On 6 Sep 2005, at 00:09, Glenn Maynard wrote:
These aren't things that need prototyping; they're algorithms that
have been implemented in C a thousand times--dropping them into a simple
Lua layer is a lot easier than reimplementing them in Lua.

Just because the specific examples exist as predefined algorithms does not mean every possible algorithm using boolean algebra does. The potential speed ups available through the use of Karnaugh maps alone makes raw bit operations incredibly valuable, let alone the host of other boolean algebra tricks.

(I'd avoid using lua_Number for bitmasks, at least, anyway; I use Lua
on systems without hardware doubles, where it's not going to be able
to hold a 32-bit mask.)

Whereas I use it on systems where Lua's configured so that lua_Number *is* a 32-bit integer.

Surely more generic is favourable to specific, especially when the new constructs both simplify and improve the expressiveness of the language?

-- 
Lisa