// docs

Documentation

Learn tape from the ground up — installation, language features, architecture, and API reference.

Getting Started

Language

Comments

Line comments, block comments, and nesting behavior.

Primitive Types

Integer, float, boolean, string, void, and color types.

Strings

UTF-8 strings, interpolation, escape sequences, and the string/[]u8 boundary.

Constants

Compile-time constant declarations evaluated before runtime.

Variables & Types

Bindings, mutability, and the tape type system.

Functions

Function declarations, default parameters, methods, and extern/export.

Control Flow

If/else, while, for loops, match, break, continue, and return.

Structs

Composite types with named fields, methods, and swizzle access.

Enums

Named integer constants with optional description strings.

Error Handling

How tape handles errors with T or Error — no exceptions, no hidden control flow.

Tagged Unions

Discriminated unions with pattern matching — safe sum types.

Optionals

Nullable values with ?T — safe absence without null pointer bugs.

Pointers & Slices

Raw pointers, const pointers, non-null pointers, slices, and arrays.

Operators & Expressions

Arithmetic, comparison, logical, pipe, cast, and string interpolation.

Defer & Errdefer

Scope-exit cleanup — run code when leaving a scope, regardless of how.

Type Aliases

Create named aliases for complex types.

Platform-Specific Code

Platform abstraction via runtime libraries and @link directives.

Attributes

User-defined and built-in attributes for metadata and compiler directives.

refactor() Blocks

Virtual module boundaries for safe, compiler-validated code extraction.

Components

Component declaration syntax and keywords.

Components

Memory

Modules

Concurrency

Metaprogramming

Regions

Architecture

CLI