From 10ed02470ceef5384a6b65261a233de0be376031 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Wed, 1 Jun 2022 14:19:17 -0400 Subject: [PATCH] Update compatibility.md Add a note on light C functions that Lua 5.2 added; suggested by #512. --- docs/_pages/compatibility.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/_pages/compatibility.md b/docs/_pages/compatibility.md index eab1aac..cdeb4fa 100644 --- a/docs/_pages/compatibility.md +++ b/docs/_pages/compatibility.md @@ -69,6 +69,7 @@ Sandboxing challenges are [covered in the dedicated section](sandbox). | `\0` in patterns | ✔️ | | | `bit32` library | ✔️ | | | `string.gsub` is stricter about using `%` on special characters only | ✔️ | | +| light C functions | 😞 | this changes semantics of fenv on C functions and has complex implications wrt runtime performance | Two things that are important to call out here are various new metamethods for tables and yielding in metamethods. In both cases, there are performance implications to supporting this - our implementation is *very* highly tuned for performance, so any changes that affect the core fundamentals of how Lua works have a price. To support yielding in metamethods we'd need to make the core of the VM more involved, since almost every single "interesting" opcode would need to learn how to be resumable - which also complicates future JIT/AOT story. Metamethods in general are important for extensibility, but very challenging to deal with in implementation, so we err on the side of not supporting any new metamethods unless a strong need arises.