lua-users home
lua-l archive

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


Sorry, can't pass up some snitty comments =)

>I have mixed feelings about Lua not including such a library
>natively.  On the one hand, bit manipulation is such a common
>operation that it should be part of Lua.  On the other, part of the
>appeal of Lua is that the language doesn't have a lot of fluff.  

Bit manipulation would seem to be, honestly, to be the complete 
counter-definition of "fluff".  Integers and bits, these are the 
fundamental building blocks of, um, everything.

>As the bitlib shows, you don't need an integer type in Lua to do bit
>manipulation.  It might have been more efficient if Lua provided an
>integer type, but that would add complexity to the language that
>doesn't need to be there.

It's hard for me to really reconcile the above statement and then the 
list of Lua's other features and think "yeah, thank goodness there 
are no integers and bit operations, those are heavyweight and aren't 
used a lot"

I kid, I kid.  Well, I don't kid really, but I jest.  I respect Lua 
and the team, this is just something that recently bit me in the ass 
trying to port some C code to Lua, and the C code is rather 
performance intensive and requires lots of bit manipulation.  Enough 
that this is a bottleneck.

Unfortunately, it's not structured such that I can just isolate it as 
a native function either.  

I'll survive, I'm sure =)

Thanks,

Brian