Primitives
First's built-in primitive types are immutable value types. This page is the complete inventory of the concrete primitives defined by the language.
Integer Types
Signed Integers
i8
i16
i32
i64
i128
Unsigned Integers
u8
u16
u32
u64
u128
Fixed Decimals
A fixed decimal uses an integer type as its backing representation. Its name has the form <integer-type>.<decimal-places>.
Signed Fixed Decimals
i8.1throughi8.3i16.1throughi16.5i32.1throughi32.10i64.1throughi64.19i128.1throughi128.39
Unsigned Fixed Decimals
u8.1throughu8.3u16.1throughu16.5u32.1throughu32.10u64.1throughu64.19u128.1throughu128.39
The maximum scale is chosen so that the scaled value remains representable by the backing integer. Fixed decimals use the wrapping behavior of that integer.
Floating-Point Types
f16
f32
f64
f128
These are IEEE 754 binary floating-point types.
Variable-Width Numbers
big is an arbitrary-precision signed integer. big.1 through big.64 are arbitrary-precision fixed decimals.
First does not provide unsigned big types.
Other Primitive Types
boolean
string
byte string
char
null
string contains Unicode text. byte string contains bytes. char contains one Unicode scalar value. boolean contains true or false, and null is the null value.
Platform Aliases
These names are aliases, not additional primitive types:
intisi32on 32-bit targets andi64on 64-bit targets.uintisu32on 32-bit targets andu64on 64-bit targets.decimalisi32.4on 32-bit targets andi64.4on 64-bit targets.udecimalisu32.4on 32-bit targets andu64.4on 64-bit targets.numberis always an alias forf64.