lua-users home
lua-l archive

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


IMHO, a worthy set of changes.

I may gave missed it, what is the reasoning of > - '__pairs'/'__ipairs' metamethod over __next? Is __next viewed as the "raw" iterator?

PS.
Please consider Mikes bitlib.

DB
Roberto Ierusalimschy wrote:
Many thanks for all comments.

Follows a (hopefully) more complete list of changes:

language:
- lexical environments
- no more fenv for threads
- ephemeron tables
- yieldable pcall/metamethods
- tables respect __len metamethod
- max constants per function raised to 2^26
- \xFF in strings
- no more verification of opcode consistency

API:
- mainthread predefined in the registry
- cpcall changed to a predefined function in the registry
- new constants LUA_OK, LUA_ERRGCMM
- lua_compare and lua_arith and lua_len
- lua_version and luaL_version
- lua_pushstring/pushlstring return string
- luaL_testudata
- luaL_tolstring
- lua_copy
- lua_upvalueid & lua_upvaluejoin
- nparams/isvarag available in debug API

stand-alone:
- handling of non-string error messages

libraries:
- bitlib
- '__pairs'/'__ipairs' metamethod
- xpcall with arguments
- optional argument to load (to control binary x text)
- loadlib may load libraries with global names (RTLD_GLOBAL)
- package.searchpath
- optional base in math.log
- file:write returns file
- closing a popen returns exit status
- os.exit may close state
- new option 'isrunning' for collectgarbage/lua_gc
- frontier patterns
- ipairs now goes until #t

implementation:
- emergency garbage collector (core forces a GC when allocation fails)
- internal (immutable) version of ctypes
- separate udata
- CallInfo stack now is a linked list
- parser uses much less C-stack space (no more auto arrays)
- new hash for floats


-- Roberto