Attribute
Syntax-Unterstützung für Lua-5.4-Attribute. Du kannst weiterhin die Deklarationen const und close verwenden und erhältst Konstantenprüfung sowie Scoped-Callbacks, wenn du auf Lua-Versionen unter 5.4 zielst.
const a = 123close _ = <close>: -> print "Außerhalb des Gültigkeitsbereichs."const a = 123close _ = <close>: -> print "Außerhalb des Gültigkeitsbereichs."Du kannst Destructuring mit als konstant markierten Variablen verwenden.
const {:a, :b, c, d} = tb-- a = 1const {:a, :b, c, d} = tb-- a = 1Du kannst auch eine globale Variable als const deklarieren.
global const Constant = 123-- Constant = 1global const Constant = 123-- Constant = 1