Language Reference
Types
Built-in type forms, generic types, pointer forms, and their current backend representations.
Design rule: the C++ representation is an
implementation choice. It does not automatically define the public
semantics of the corresponding Raz type.
| Raz type | Current meaning / representation |
|---|---|
i64 |
64-bit signed integer; emitted using a GNU-compatible predefined 64-bit integer alias verified by a generated static assertion. |
f64 |
64-bit floating-point; emitted as C++ double.
|
bool |
Boolean; emitted as C++ bool. |
char |
Character value; emitted as C++ char. |
string |
String; emitted as std::string. |
void |
Permitted function return type, not a value or field type. |
Point |
A user-defined struct type. |
List<T> |
Generic list, represented as
std::vector<T>. Element operations remain
limited to supported helpers.
|
Ref<T> |
Reference-like type emitted as T&. Lifetime
and aliasing rules are not fully defined.
|
char* |
Raw character pointer, currently permitted only inside an
unsafe context.
|
Fn(A, B)->R |
Function-value type with parameter and return signature. Capture and closure semantics are not specified. |
nullptr |
Null pointer literal. Valid assignment and comparison contexts need a formal rule. |
Examples
let count: i64 = 42;
let ratio: f64 = 3.5;
let values: List<i64> = [1, 2, 3];
struct Point {
x: i64;
y: i64;
}
Rules that remain open
- Numeric promotion, narrowing, overflow, and division behavior.
- Value copying, container mutation, and invalid-index behavior.
- Reference lifetime, aliasing, and return restrictions.
- The full safety boundary for pointers and native calls.
- Function values, closures, and capture lifetime.