[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: [ANNOUNCE] Lua 3.1 alpha
- From: lhf (Luiz Henrique de Figueiredo)
- Date: Wed, 14 Jan 1998 19:35:05 -0200
Lua 3.1 is now available for *alpha* testing at
ftp://ftp.icad.puc-rio.br/pub/lua/lua-3.1alpha.tar.gz
ftp://csg.uwaterloo.ca/pub/lhf/lua/lua-3.1alpha.tar.gz
This package includes updated documentation in lua/doc.
See below for a list of major changes and incompatibilities.
Please report any problems.
Thanks.
--lhf
* Changes from version 3.0 to 3.1 alpha
+ NEW FEATURE: anonymous functions with closures (via "upvalues").
+ new syntax:
- local variables in chunks.
- better scope control with DO block END.
- constructors can now be also written: { record-part; list-part }.
- more general syntax for function calls and lvalues, e.g.:
f().x=1
o:f(x,y):g(z)
+ major code re-organization and clean-up; reduced module interdependecies.
+ support for multiple contexts.
+ new traversal functions "foreach" and "foreachvar".
+ changing lua to use doubles instead of floats is now trivial.
+ complete debug information stored in pre-compiled chunks.
* Incompatibilities from Lua 3.0 to 3.1 alpha
- To support multiple contexts, Lua 3.1 must be explicitly opened before used.
However, all standard libraries check whether Lua is already opened, so any
program that opens at least one standard library before using Lua API does
not need to be modified.
- Function "dostring" no longer accepts an optional second argument, with a
temporary error method. This facility is now provided by function "call".
- Function "gsub" no longer accepts an optional fourth argument (a callback
data, a table). Closures replace this feature with advantage.
- The syntax for function declaration is now more restricted;
for instance, the old syntax "function f[exp] (x) ... end" is not accepted in
3.1. In these cases, programs should use an explicit assignment instead, like
"f[exp] = function (x) ... end".
- Old pre-compiled code is obsolete, and must be re-compiled.
- The option "a=b" in Lua stand-alone now sets "a" to the *string* "b",
and not to the value of "b".