bool
-
bool .
-
Has a size of 1
byte(b8).
bool
-
Other bools:
b8 b16 b32 b64-
"The only world where you would use one of these other bools is if you are making a binding for another language that has different sized bool types."
-
boolis equivalent tob8.
-
nil
-
Types that support
nil:-
rawptr -
any -
cstring -
typeid -
enum -
bit_set -
Slices
-
procvalues -
Pointers
-
#soaPointers -
Multi-Pointers
-
Dynamic Arrays
-
map -
unionwithout the#no_nildirective -
#soaslices -
#soadynamic arrays
-
rawptr
-
rawptr .
-
All pointers can implicitly convert to
rawptr.
integer
-
βnaturalβ register size.
-
Is guaranteed to be greater than or equal to the size of a pointer.
-
When you need an integer value, you should default to using
intunless you have a specific reason to use a sized or unsigned integer type
int uint -
-
Specific sizes:
i8 i16 i32 i64 i128 u8 u16 u32 u64 u128 -
Pointer size:
uintptr -
Endian-specific integers:
// little endian i16le i32le i64le i128le u16le u32le u64le u128le // big endian i16be i32be i64be i128be u16be u32be u64be u128be
float
-
No need to use
fin front of the float.
f16 f32 f64
-
Endian-specific floating point numbers:
// little endian f16le f32le f64le // big endian f16be f32be f64be
rune
-
Signed 32-bit integer.
-
Represents a Unicode code point.
-
Is a distinct type from
i32.
rune