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

Unsigned Fixed Decimals

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: