-
Notifications
You must be signed in to change notification settings - Fork 2
Data types
iaminfinityiq edited this page Mar 19, 2026
·
19 revisions
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):
-
int: Represents an integer value with a range of-2^63up until2^63 - 1(guaranteed at least 64 bits, may vary). This is the equivalence of C++'slong longdata type. - Arithmetic -
double: Represents a floating point value with the maximum of approximately1.7976931348623157 * 10^308, and the smallest positive value is approximately4.9 * 10^-324. This is the equivalence of C++'sdoubledata type. - Arithmetic -
string: Represents a string. - Addable -
boolean: Represents a boolean, with2different value:trueandfalse. - Arithmetic -
null_type: Represents anullvalue. - Comparable -
function: Represents a function (not implemented, base data type for built-in functions). - None -
builtin_func: Represents a built-in function intix. - Callable -
module: Represents a module intix. - None -
type: Represents a type intix. - 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.