[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: stldib does not like luajit
- From: Mike Pall <mikelu-0809@...>
- Date: Thu, 11 Sep 2008 18:07:20 +0200
> If I do:
> print(string.format("The %s is %d", "answer", 42)
> in luajit I get the output
> The %s is %d
> but if I do not require('std')
> then output is as expected
Apparently stdlib has not been updated to use Lua 5.1 semantics
regarding varargs. And LuaJIT does not have the Lua 5.0 vararg
backwards compatibility enabled by default.
Anyway, stdlib has some strange code like:
if #arg == 0 then ...
Which is mixing Lua 5.1 syntax (# operator) and Lua 5.0 syntax
There's more ugliness inside like an __index function for the
string metatable, overriding lots of standard functions and in
general adding lots of bloat. So I suggest to stay away from it.