Skip to content

Data types

iaminfinityiq edited this page Mar 19, 2026 · 19 revisions

Data types

We refer to those data types as pre-defined data types because they are built-in to the language itself.

Data types can implement one or more capabilities, depending on what operations they support. Here are the three main capabilities our pre-defined data types support:

  • Comparable: data types that supports comparison operations: ==, !=, >, <, >=, <=
  • Addable: data types that supports addition
  • Arithmetic: data types that supports full mathematical operations, including comparison operators
  • Callable: data types that supports call operations

Those are the 9 pre-defined data types Tix provides (as of 18/3/2026):

  1. int: Represents an integer value with a range of -2^63 up until 2^63 - 1 (guaranteed at least 64 bits, may vary). This is the equivalence of C++'s long long data type. - Arithmetic
  2. double: Represents a floating point value with the maximum of approximately 1.7976931348623157 * 10^308, and the smallest positive value is approximately 4.9 * 10^-324. This is the equivalence of C++'s double data type. - Arithmetic
  3. string: Represents a string. - Addable
  4. boolean: Represents a boolean, with 2 different value: true and false. - Arithmetic
  5. null_type: Represents a null value. - Comparable
  6. function: Represents a function (not implemented, base data type for built-in functions). - None
  7. builtin_func: Represents a built-in function in tix. - Callable
  8. module: Represents a module in tix. - None
  9. type: Represents a type in tix. - None

Please do note that arithmetic operations on number data types may wrap around or causing unexpected results, these behaviors are the same as C++'s behavior.

For Tix's built-in modules, please refer here.

Clone this wiki locally