Update compatibility.md

Add a note about function identity
This commit is contained in:
Arseny Kapoulkine 2022-01-12 11:56:46 -08:00 committed by GitHub
parent abf9fc2754
commit d6ba106be6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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