Skip to content

Primitive Types

TypeLiteral syntaxExample
Intplain integer42
Longinteger with L suffix100L
Doubledecimal point, no suffix3.14
Decimaldecimal point with d suffix9.99d
Booltrue / falsetrue
Stringdouble-quoted"hello"
Idno literal. Runtime only(from DML)
Voidthe keyword VoidVoid

Void is a real first-class value. A function that only produces side effects declares : Void and ends with Void as its trailing expression.

fn log(
message: String,
): Void {
debug message
Void
}

No implicit widening between numeric types. Both sides of an arithmetic expression must be the same type.