歡迎您光臨本站 註冊首頁

Lua 5.4.0 正式釋出

←手機掃碼閱讀     admin @ 2020-07-01 , reply:0

Lua 團隊正式釋出了 Lua 5.4.0 版本。以下是從 5.3 到 5.4 的主要變更:

  • 新一代的垃圾回收機制
  • 新增 to-be-closed 變數
  • 新增 const 變數
  • userdata 可以具有多個使用者的值
  • 隨機數生成函式 math.random 採用了新的實現方法
  • 新增警告系統(warning system)
  • 可對函式引數和返回值的資訊進行除錯
  • 針對整數的 'for' 迴圈增加了新語義
  • 針對 'string.gmatch' 增加了可選的 'init' 引數
  • 新增 'lua_resetthread' 和 'coroutine.close' 函式
  • 將 string-to-number 遷移至 string 庫
  • 分配函式在減少記憶體塊時支援失敗
  • 為 'string.format' 新引入的格式 '%p'
  • utf8 庫可接受數值最高為 2^31 的程式碼點(codepoint)

更新說明:https://www.lua.org/manual/5.4/readme.html#changes


[admin ]

來源:OsChina
連結:https://www.oschina.net/news/116830/lua-5-4-0-released
Lua 5.4.0 正式釋出已經有82次圍觀

http://coctec.com/news/all/show-post-240499.html