Object types

The object types are tables and functions, user data and threads.

All object types are passed by reference. This means that when assigning a second variable to the value of another which was set to an object type, the object is not duplicated but rather the second variable now references to the same object as the first.

Lua does not provide a mechanism for duplicating an object types, however it is easy to implement table duplication; function duplication is not practical, and user data duplication is usually context specific whether this functionality is applicable. Threads are not covered in this guide.

Object comparison

a == b -- is only true if a and b refer to the same object, not just objects with the same logical value