by marhee · 1y ago · 0 comments
Another caveat is that Lua can have more than one internal representation for the same type, and those have different type tag variants. For instance: strings can be represented internally as either short or long strings; Functions can be Lua closures, C closures, or perhaps even an object with a __call metamethod; Objects can be either tables or userdata.
The Lua folks want a simple codebase, so they (knowingly) leave a lot of performance on the table in favor of simplicity.