Accessing Type Metatables Lua -


its getmetatable can access metatables of several types:

getmetatable("") getmetatable({}) getmetatable(newproxy(true)) 

however appears though cannot metatable of other types (functions aside). there appears no way access metatable of numbers, booleans, or nil.

i wondering if 1 able access metatable of entire table type. able this:

({}) + ({}) 

numbers, booleans , nil have no metatable default (hence getmetatable returning nil). can give them 1 debug.setmetatable though.

there no common table metatable. (and same userdata (at least of heavy variety))


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -