1*21d3294cSantirezHISTORY for Lua 5.1 2*21d3294cSantirez 3*21d3294cSantirez* Changes from version 5.0 to 5.1 4*21d3294cSantirez ------------------------------- 5*21d3294cSantirez Language: 6*21d3294cSantirez + new module system. 7*21d3294cSantirez + new semantics for control variables of fors. 8*21d3294cSantirez + new semantics for setn/getn. 9*21d3294cSantirez + new syntax/semantics for varargs. 10*21d3294cSantirez + new long strings and comments. 11*21d3294cSantirez + new `mod' operator (`%') 12*21d3294cSantirez + new length operator #t 13*21d3294cSantirez + metatables for all types 14*21d3294cSantirez API: 15*21d3294cSantirez + new functions: lua_createtable, lua_get(set)field, lua_push(to)integer. 16*21d3294cSantirez + user supplies memory allocator (lua_open becomes lua_newstate). 17*21d3294cSantirez + luaopen_* functions must be called through Lua. 18*21d3294cSantirez Implementation: 19*21d3294cSantirez + new configuration scheme via luaconf.h. 20*21d3294cSantirez + incremental garbage collection. 21*21d3294cSantirez + better handling of end-of-line in the lexer. 22*21d3294cSantirez + fully reentrant parser (new Lua function `load') 23*21d3294cSantirez + better support for 64-bit machines. 24*21d3294cSantirez + native loadlib support for Mac OS X. 25*21d3294cSantirez + standard distribution in only one library (lualib.a merged into lua.a) 26*21d3294cSantirez 27*21d3294cSantirez* Changes from version 4.0 to 5.0 28*21d3294cSantirez ------------------------------- 29*21d3294cSantirez Language: 30*21d3294cSantirez + lexical scoping. 31*21d3294cSantirez + Lua coroutines. 32*21d3294cSantirez + standard libraries now packaged in tables. 33*21d3294cSantirez + tags replaced by metatables and tag methods replaced by metamethods, 34*21d3294cSantirez stored in metatables. 35*21d3294cSantirez + proper tail calls. 36*21d3294cSantirez + each function can have its own global table, which can be shared. 37*21d3294cSantirez + new __newindex metamethod, called when we insert a new key into a table. 38*21d3294cSantirez + new block comments: --[[ ... ]]. 39*21d3294cSantirez + new generic for. 40*21d3294cSantirez + new weak tables. 41*21d3294cSantirez + new boolean type. 42*21d3294cSantirez + new syntax "local function". 43*21d3294cSantirez + (f()) returns the first value returned by f. 44*21d3294cSantirez + {f()} fills a table with all values returned by f. 45*21d3294cSantirez + \n ignored in [[\n . 46*21d3294cSantirez + fixed and-or priorities. 47*21d3294cSantirez + more general syntax for function definition (e.g. function a.x.y:f()...end). 48*21d3294cSantirez + more general syntax for function calls (e.g. (print or write)(9)). 49*21d3294cSantirez + new functions (time/date, tmpfile, unpack, require, load*, etc.). 50*21d3294cSantirez API: 51*21d3294cSantirez + chunks are loaded by using lua_load; new luaL_loadfile and luaL_loadbuffer. 52*21d3294cSantirez + introduced lightweight userdata, a simple "void*" without a metatable. 53*21d3294cSantirez + new error handling protocol: the core no longer prints error messages; 54*21d3294cSantirez all errors are reported to the caller on the stack. 55*21d3294cSantirez + new lua_atpanic for host cleanup. 56*21d3294cSantirez + new, signal-safe, hook scheme. 57*21d3294cSantirez Implementation: 58*21d3294cSantirez + new license: MIT. 59*21d3294cSantirez + new, faster, register-based virtual machine. 60*21d3294cSantirez + support for external multithreading and coroutines. 61*21d3294cSantirez + new and consistent error message format. 62*21d3294cSantirez + the core no longer needs "stdio.h" for anything (except for a single 63*21d3294cSantirez use of sprintf to convert numbers to strings). 64*21d3294cSantirez + lua.c now runs the environment variable LUA_INIT, if present. It can 65*21d3294cSantirez be "@filename", to run a file, or the chunk itself. 66*21d3294cSantirez + support for user extensions in lua.c. 67*21d3294cSantirez sample implementation given for command line editing. 68*21d3294cSantirez + new dynamic loading library, active by default on several platforms. 69*21d3294cSantirez + safe garbage-collector metamethods. 70*21d3294cSantirez + precompiled bytecodes checked for integrity (secure binary dostring). 71*21d3294cSantirez + strings are fully aligned. 72*21d3294cSantirez + position capture in string.find. 73*21d3294cSantirez + read('*l') can read lines with embedded zeros. 74*21d3294cSantirez 75*21d3294cSantirez* Changes from version 3.2 to 4.0 76*21d3294cSantirez ------------------------------- 77*21d3294cSantirez Language: 78*21d3294cSantirez + new "break" and "for" statements (both numerical and for tables). 79*21d3294cSantirez + uniform treatment of globals: globals are now stored in a Lua table. 80*21d3294cSantirez + improved error messages. 81*21d3294cSantirez + no more '$debug': full speed *and* full debug information. 82*21d3294cSantirez + new read form: read(N) for next N bytes. 83*21d3294cSantirez + general read patterns now deprecated. 84*21d3294cSantirez (still available with -DCOMPAT_READPATTERNS.) 85*21d3294cSantirez + all return values are passed as arguments for the last function 86*21d3294cSantirez (old semantics still available with -DLUA_COMPAT_ARGRET) 87*21d3294cSantirez + garbage collection tag methods for tables now deprecated. 88*21d3294cSantirez + there is now only one tag method for order. 89*21d3294cSantirez API: 90*21d3294cSantirez + New API: fully re-entrant, simpler, and more efficient. 91*21d3294cSantirez + New debug API. 92*21d3294cSantirez Implementation: 93*21d3294cSantirez + faster than ever: cleaner virtual machine and new hashing algorithm. 94*21d3294cSantirez + non-recursive garbage-collector algorithm. 95*21d3294cSantirez + reduced memory usage for programs with many strings. 96*21d3294cSantirez + improved treatment for memory allocation errors. 97*21d3294cSantirez + improved support for 16-bit machines (we hope). 98*21d3294cSantirez + code now compiles unmodified as both ANSI C and C++. 99*21d3294cSantirez + numbers in bases other than 10 are converted using strtoul. 100*21d3294cSantirez + new -f option in Lua to support #! scripts. 101*21d3294cSantirez + luac can now combine text and binaries. 102*21d3294cSantirez 103*21d3294cSantirez* Changes from version 3.1 to 3.2 104*21d3294cSantirez ------------------------------- 105*21d3294cSantirez + redirected all output in Lua's core to _ERRORMESSAGE and _ALERT. 106*21d3294cSantirez + increased limit on the number of constants and globals per function 107*21d3294cSantirez (from 2^16 to 2^24). 108*21d3294cSantirez + debugging info (lua_debug and hooks) moved into lua_state and new API 109*21d3294cSantirez functions provided to get and set this info. 110*21d3294cSantirez + new debug lib gives full debugging access within Lua. 111*21d3294cSantirez + new table functions "foreachi", "sort", "tinsert", "tremove", "getn". 112*21d3294cSantirez + new io functions "flush", "seek". 113*21d3294cSantirez 114*21d3294cSantirez* Changes from version 3.0 to 3.1 115*21d3294cSantirez ------------------------------- 116*21d3294cSantirez + NEW FEATURE: anonymous functions with closures (via "upvalues"). 117*21d3294cSantirez + new syntax: 118*21d3294cSantirez - local variables in chunks. 119*21d3294cSantirez - better scope control with DO block END. 120*21d3294cSantirez - constructors can now be also written: { record-part; list-part }. 121*21d3294cSantirez - more general syntax for function calls and lvalues, e.g.: 122*21d3294cSantirez f(x).y=1 123*21d3294cSantirez o:f(x,y):g(z) 124*21d3294cSantirez f"string" is sugar for f("string") 125*21d3294cSantirez + strings may now contain arbitrary binary data (e.g., embedded zeros). 126*21d3294cSantirez + major code re-organization and clean-up; reduced module interdependecies. 127*21d3294cSantirez + no arbitrary limits on the total number of constants and globals. 128*21d3294cSantirez + support for multiple global contexts. 129*21d3294cSantirez + better syntax error messages. 130*21d3294cSantirez + new traversal functions "foreach" and "foreachvar". 131*21d3294cSantirez + the default for numbers is now double. 132*21d3294cSantirez changing it to use floats or longs is easy. 133*21d3294cSantirez + complete debug information stored in pre-compiled chunks. 134*21d3294cSantirez + sample interpreter now prompts user when run interactively, and also 135*21d3294cSantirez handles control-C interruptions gracefully. 136*21d3294cSantirez 137*21d3294cSantirez* Changes from version 2.5 to 3.0 138*21d3294cSantirez ------------------------------- 139*21d3294cSantirez + NEW CONCEPT: "tag methods". 140*21d3294cSantirez Tag methods replace fallbacks as the meta-mechanism for extending the 141*21d3294cSantirez semantics of Lua. Whereas fallbacks had a global nature, tag methods 142*21d3294cSantirez work on objects having the same tag (e.g., groups of tables). 143*21d3294cSantirez Existing code that uses fallbacks should work without change. 144*21d3294cSantirez + new, general syntax for constructors {[exp] = exp, ... }. 145*21d3294cSantirez + support for handling variable number of arguments in functions (varargs). 146*21d3294cSantirez + support for conditional compilation ($if ... $else ... $end). 147*21d3294cSantirez + cleaner semantics in API simplifies host code. 148*21d3294cSantirez + better support for writing libraries (auxlib.h). 149*21d3294cSantirez + better type checking and error messages in the standard library. 150*21d3294cSantirez + luac can now also undump. 151*21d3294cSantirez 152*21d3294cSantirez* Changes from version 2.4 to 2.5 153*21d3294cSantirez ------------------------------- 154*21d3294cSantirez + io and string libraries are now based on pattern matching; 155*21d3294cSantirez the old libraries are still available for compatibility 156*21d3294cSantirez + dofile and dostring can now return values (via return statement) 157*21d3294cSantirez + better support for 16- and 64-bit machines 158*21d3294cSantirez + expanded documentation, with more examples 159*21d3294cSantirez 160*21d3294cSantirez* Changes from version 2.2 to 2.4 161*21d3294cSantirez ------------------------------- 162*21d3294cSantirez + external compiler creates portable binary files that can be loaded faster 163*21d3294cSantirez + interface for debugging and profiling 164*21d3294cSantirez + new "getglobal" fallback 165*21d3294cSantirez + new functions for handling references to Lua objects 166*21d3294cSantirez + new functions in standard lib 167*21d3294cSantirez + only one copy of each string is stored 168*21d3294cSantirez + expanded documentation, with more examples 169*21d3294cSantirez 170*21d3294cSantirez* Changes from version 2.1 to 2.2 171*21d3294cSantirez ------------------------------- 172*21d3294cSantirez + functions now may be declared with any "lvalue" as a name 173*21d3294cSantirez + garbage collection of functions 174*21d3294cSantirez + support for pipes 175*21d3294cSantirez 176*21d3294cSantirez* Changes from version 1.1 to 2.1 177*21d3294cSantirez ------------------------------- 178*21d3294cSantirez + object-oriented support 179*21d3294cSantirez + fallbacks 180*21d3294cSantirez + simplified syntax for tables 181*21d3294cSantirez + many internal improvements 182*21d3294cSantirez 183*21d3294cSantirez(end of HISTORY) 184