/
User data

User data

The user data type in Lua is basically how Lua gives the ability to wrap a user defined C or C++ object.

It’s possible to overuse and abuse this facility in Lua. I think in hindsight I overused this part of the Lua language in the first iteration of the translator.

It’s better to use Lua tables if you can.

See the types in Lua.

Related content

The core types of Lua
The core types of Lua
More like this
Lua only has one complex data-structure
Lua only has one complex data-structure
More like this
User data type
User data type
More like this
Example code showing the eight basic types in Lua
Example code showing the eight basic types in Lua
More like this
Value Types
More like this
The core eight types in Lua.
The core eight types in Lua.
More like this