Lua 5.3.0 正式版发布

jopen 9年前

Lua 是一个小巧的脚本语言。作者是巴西人。该语言的设计目的是为了嵌入应用程序中,从而为应用程序提供灵活的扩展和定制功能。

Lua脚本可以很容易的被C/C++代码调用,也可以反过来调用C/C++的函数,这使得Lua在应用程序中可以被广泛应用。不仅仅作为扩展脚本,也可以作为普通的配置文件,代替XML,Ini等文件格式,并且更容易理解和维护。

Lua由标准C编写而成,代码简洁优美,几乎在所有操作系统和平台上都可以编译,运行。

一个完整的Lua解释器不过200k,在目前所有脚本引擎中,Lua的速度是最快的。这一切都决定了Lua是作为嵌入式脚本的最佳选择。

经过 4 个 RC 版本,Lua 终于迎来了 5.3.0 正式版。新版本主要增加对整数支持,支持位操作,提供一个基本的 UTF-8 库。

下载地址:http://www.lua.org/ftp/lua-5.3.0.tar.gz

其他方面的改进包括:

语言特性

  • userdata can have any Lua value as uservalue

  • integer division

  • more flexible rules for some metamethods

  • ipairsand the table library respect metamethods

  • strip option instring.dump

  • table library respects metamethods

  • new functiontable.move

  • new functionstring.pack

  • new functionstring.unpack

  • new functionstring.packsize

C API

  • simpler API for continuation functions in C

  • lua_gettableand similar functions return type of resulted value

  • strip option inlua_dump

  • new function:lua_geti

  • new function:lua_seti

  • new function:lua_isyieldable

  • new function:lua_numbertointeger

  • new function:lua_rotate

  • new function:lua_stringtonumber

Lua 标准解释器

  • can be used as calculator; no need to prefix with '='

  • argtable available to all code