Skip to content

Commit

Permalink
Update compatibility.md
Browse files Browse the repository at this point in the history
Add a note about function identity
  • Loading branch information
zeux authored Jan 12, 2022
1 parent abf9fc2 commit d6ba106
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/_pages/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,5 @@ We have a few behavior deviations from Lua 5.x that come from either a different
* Tail calls are not supported to simplify implementation, make debugging/stack traces more predictable and allow deep validation of caller identity for security
* Order of table assignment in table literals follows program order in mixed tables (Lua 5.x assigns array elements first in some cases)
* Equality comparisons call `__eq` metamethod even when objects are rawequal (which matches other metamethods like `<=` and facilitates NaN checking)
* `function()` expressions may reuse a previosly created closure in certain scenarios (when all upvalues captured are the same) for efficiency, which changes object identity but doesn't change call semantics -- this is different from Lua 5.1 but similar to Lua 5.2/5.3
* `os.time` returns UTC timestamp when called with a table for consistency

0 comments on commit d6ba106

Please sign in to comment.