lua-users home
lua-l archive

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


> Is there a quick list of "things that no longer work"?

(Also includes "things that work differently")

- The whole tag-method scheme was replaced by metatables.

- Function calls written between parentheses result in exactly one value.

- A function call as the last expression in a list constructor (like
{a,b,f()}) has all its return values inserted in the list.

- The precedence of or is smaller than the precedence of and.

- in, false, and true are reserved words.

- The old construction <<for k,v in t>>, where t is a table, is
deprecated (although it is still supported). Use <<for k,v in pairs(t)>>
instead.

- When a literal string of the form [[...]] starts with a newline,
this newline is ignored.

- Upvalues in the form %var are obsolete; use external local variables
instead.

- Most library functions now are defined inside tables. There is a
compatibility script (compat.lua) that redefine most of them as global
names.

- In the math library, angles are expressed in radians. With the
compatibility script (compat.lua), functions still work in degrees.

- The "call" function is deprecated. Use f(unpack(tab)) instead of
call(f, tab) for unprotected calls, or the new pcall function for
protected calls.

- dofile do not handle errors, but simply propagates them.

- dostring is deprecated. Use loadstring instead.

- lua_pushuserdata is deprecated. Use lua_newuserdata or
lua_pushlightuserdata instead.


-- Roberto