Lua 5.2 is the planned next major revision[1] of Lua following 5.1. This page describes what has been reported about 5.2 on the mailing list and elsewhere. This page is not officially endorsed by the lead Lua designers and its content may be out-of-date or incorrect.
Scope
While 5.1.x versions are strictly bug-fix only versions of 5.1[5][6][2], Lua 5.2 is allowed to make design changes that break full compatibility.
Features
As of February 2008, there is no complete list of changes nor a scheduled release date.[3] The following changes have been mentioned in various places[7].
- emergency garbage collector (core forces a GC when allocation fails).
- handling of non-string error messages (somewhat along the lines of John Belmonte's suggestion)
- new function package.searchpath (Related discussion: [8])
- udata with finalizers are kept in a separated list for the GC
- arguments for function called through xpcall (Related discussion: [10][11][12])
- The Lua program produced by this script fails to run on Windows:
io.write('s = ' .. string.format('%q', '[\26]') .. '\n'). This is reported to be improved in 5.2[13].
Also under consideration:
- string.pack/string.unpack (along the lines of struct/lpack) (Related discussion: [14][4])
- Mike Pall's implementation for yield (using longjmp), allowing yields in several places not allowed currently (inside pcall, metamethods, etc.)
- some form of bit operations. (We are not very happy with any known implementation. Maybe just incorporate bitlib?) (Related discussion: BitwiseOperators)
- there is already a new function luaL_tolstring (along the lines of the 'tostring' function). Maybe we should define a lua_rawtostring (no coercions from numbers) and then use luaL_tolstring ("full" coercion from other types) when we want to allow coercions. The point is where to use one and where to use the other. (The current lua_tostring behavior would be deprecated in the future...)
- Is constant folding staying?[16]
The history of Lua (see [The Evolution of Lua]) also provides some hints for where Lua is likely going.
Suggestions
Some features/changes proposed by users for 5.2 are listed in FeatureProposals. Requests should be posted to the mailing list.
See Also
- [1] Lua version history
- [7] Initial list of planned changes in 5.2 posted by Roberto Ierusalimschy (2008-02-19)
- FeatureProposals
FindPage · RecentChanges · preferences
edit · history
Last edited March 18, 2008 12:03 am GMT (diff)