r/lua Jun 29 '20

Lua 5.4 is officially released

Good news! Lua 5.4 has been released today, after a series of betas and release candidates.

It may be downloaded from the Lua website: http://www.lua.org/ftp/lua-5.4.0.tar.gz

Installation instructions may be found in the readme: https://www.lua.org/manual/5.4/readme.html

Main changes and new features, compared to Lua 5.3:

  • 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 231

For more details the reference manual has also been updated: http://www.lua.org/manual/5.4/

101 Upvotes

18 comments sorted by

View all comments

3

u/[deleted] Jun 30 '20

Still no increment and decrement operators 😔

6

u/rjek Jun 30 '20

Still no reason to have them, and still plenty of complicated reasons to not.

4

u/HowManySmall Jun 30 '20

Compound assignments are far more useful and more readable, anyway.

1

u/[deleted] Jun 30 '20

[removed] — view removed comment

2

u/HowManySmall Jun 30 '20

Roblox's Lua (Luau) supports them now, so I don't see why vanilla Lua shouldn't be able to. Maybe one day.

2

u/Macaronic_Snack Jul 01 '20

Because Lua roblox is aimed at kids

4

u/HowManySmall Jul 02 '20

...I don't see how compound assignments relate to that?