[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] vstruct - 1.0 beta 2
- From: Christof Schardt <christof@...>
- Date: Fri, 25 Jul 2008 13:50:14 +0200
Ben Kelly wrote:
> Wow, it's been a while. Got distracted by various things, but now beta 2
> is here. Comments, criticisms, bug reports, feature requests, and
> patches are welcome.
u = u * 2^8 + s:sub(i,i):byte()
could be changed to
u = u * 2^8 + s:byte(i)
BTW: "2^8", will this this optimized by the interpreter, or
should you rather write 256?
Generally: nice, luaish peace of code.
The tricky module-mechanism is not easy to
understand. I mean things like this
local name = (...):gsub('%.[^%.]+$', '')
local read = require (name..".read")
and similar lines.
Wouldn't it be worthwhile to explain this idiom and
put it as a "Lua-Mini-Gem" to the Wiki?
(while we are waiting for the Lua Gemas ;-)