Skip to content

5.4.6

Choose a tag to compare

@Mhatxotic Mhatxotic released this 28 Dec 16:09
· 4 commits to master since this release
5.4.6
371b28a

Lua 5.4 was released on 29 Jun 2020. Its main new features are a new generational mode for garbage collection and const and to-be-closed variables.

Here are the main changes introduced in Lua 5.4. The reference manual lists the incompatibilities that had to be introduced.

Main changes…

  • new generational mode for garbage collection
  • to-be-closed variables
  • const variables
  • userdata can have multiple user values
  • new implementation for math.random
  • warning system
  • debug information about function arguments and returns
  • new semantics for the integer 'for' loop
  • optional 'init' argument to 'string.gmatch'
  • new functions 'lua_resetthread' and 'coroutine.close'
  • string-to-number coercions moved to the string library
  • allocation function allowed to fail when shrinking a memory block
  • new format '%p' in 'string.format'
  • utf8 library accepts codepoints up to 2^31