lua-users home
lua-l archive

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

Lua 5.0 (alpha) is very nice.

I like what has been done with lauxlib.c.
luaL_openlib and luaL_error make life a lot easier.

There is a mistake in the manual on page 22.  Adding the line with replace
removes one value from the stack which was not accounted for, so the result
of settop looks wrong.  lua_settop(L,-3) should pop 2 values from the

I think removing _ALERT and _ERRORMESSAGE, adding _TRACEBACK should be
added to the list of changes.

The index and web version of the manual are great!

There are still a few undocumented features like __tostring, __metatable,
and table.concat which should be advertised more.

I find newproxy a curious addition.  It gives you unique userdata that
share the same metatable.  I cannot think of a use for it yet.
What did you have in mind?

I like pairs and ipairs, (especially now that table.getn(t) is extra
verbose), but ipairs can fool you if you put nil in the middle of your
$ lua
Lua 5.0 (alpha)  Copyright (C) 1994-2002 Tecgraf, PUC-Rio
> t = { 1,2,3,4,5,6 }
> t[4] = nil
> for n,v in ipairs(t) do print(n,v) end
1       1
2       2
3       3

- Peter