The core types of Lua

Lua has only 8 basic types in the language:

  1. Number (which can be a double or integer)

  2. String

  3. Boolean

  4. Function

  5. Userdata

  6. Table

  7. Nil

  8. Thread

This is very significant design choice in the language. Compared to something like Python which has dozens of built in types and which is often adding new types with each revision of the language. By only having one built in complex data-structure in the language - this is the Lua table which can behave as an array or hash table the language is extremely small.

The small size allows the code to be much less in size to implement the language which is why it’s so fast, stable and reliable.