Builtin Types
This page lists Shape’s core surface types and their intended use.
These are module-owned surface names, not user-defined globals. Import the ones you use explicitly. For the full target model, see Names and Scope.
from std::core::intrinsics use { Vec, Mat, Table, DateTime, Result, Option, AnyError, HashMap}print("imported")// Prelude convenience does not change module ownership.print("ok")The types on this page are not prelude names.
Scalar Types
Section titled “Scalar Types”| Type | Description |
|---|---|
int | Signed 64-bit integer (default) |
number | Floating-point numeric value (f64) |
bool | Boolean (true / false) |
string | UTF-8 text |
none | Explicit absence value |
Width-Specific Integers
Section titled “Width-Specific Integers”| Type | Description |
|---|---|
i8 / u8 | 8-bit signed / unsigned |
i16 / u16 | 16-bit signed / unsigned |
i32 / u32 | 32-bit signed / unsigned |
u64 | 64-bit unsigned |
Width types support literal suffixes (42i8, 255u8) and out-of-range literals
are rejected at compile time. Overflow-arithmetic semantics are not yet uniform
across execution modes — see Integer Width Types
for the full runtime-support details. Use int for general-purpose integer work.
Generic Container Types
Section titled “Generic Container Types”| Type | Description |
|---|---|
Vec<T> | Ordered homogeneous sequence |
Mat<T> | Dense matrix (numeric workloads) |
Table<T> | Typed row-oriented data |
Option<T> | Optional value (Some(v) / None) |
Result<T, E> | Fallible value (Ok(v) / Err(e)) |
HashMap<K, V> | Ordered key-value map |
[]literals infer asVec<T>.Table<T>andVec<T>are separate abstractions:Vec<T>is positional sequence data.Table<T>is named-column row data.
Mat<T>is the canonical matrix surface type name.Matrix<T>is not accepted.printis prelude-provided; the types on this page are not.