lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Tue, Nov 16, 2021 at 1:47 PM Luiz Henrique de Figueiredo <> wrote:
The complete diffs from Lua 5.4.3 are available at


@@ -1636,8 +1636,10 @@
-The assignment statement first evaluates all its expressions
-and only then the assignments are performed.
+If a variable is both assigned and read
+inside a multiple assignment,
+Lua ensures all reads get the value of the variable
+before the assignment.
 Thus the code

@@ -1662,6 +1664,14 @@
+Note that this guarantee covers only accesses
+syntactically inside the assignment statement.
+If a function or a metamethod called during the assignment
+changes the value of a variable,
+Lua gives no guarantees about the order of that access.
Why are we losing this guarantee? Especially in a bugfix release? If there is code relying on the previous guarantee (that all expressions are evaluated first) that worked in Lua 5.4.3, that code is now broken (even if only by documentation) in Lua 5.4.4. So why a breaking (documentation) change in a bugfix release?