Lua 5.5 Programming Language Released

After five years of development, Lua 5.5 has been released. Lua is a fast and compact scripting programming language that is widely used as an embedded language for defining configuration and writing extensions. The Lua interpreter code is written in C and distributed under the MIT license.

Lua combines a simple procedural syntax with the ability to describe data through the use of associative arrays and extensible language semantics. It uses dynamic typing and translates language constructs into bytecode that runs on top of a register-based virtual machine with automatic garbage collection. The interpreter is designed as a library that can be integrated into projects in the C and C++ languages.

Main innovations in Lua 5.5 include:

  • For most garbage collection operations, incremental mode is used. This mode divides the garbage collection cycle into separate steps, alternating with program execution, to eliminate long pauses in the execution of applications with a large number of objects in memory.
  • A compact implementation of arrays is proposed, requiring 60% less memory for arrays with the same type of data.
  • The possibility to explicitly declare global variables in any code blocks using the keyword “global” has been added.
  • Control variables specified in “for” loops are now read-only and cannot be changed in the body of the loop.
  • When printing floating point numbers via the print function, enough digits are now printed to correctly convert back from the string to the original representation.
  • The allowed number of nesting levels of table constructors has been increased.
  • A new function
/Reports, release notes, official announcements.