Skip to Content
Cloth
DocumentationWelcome

Welcome

This is the official documentation for the Cloth programming language.

Cloth is a high-performance, object-oriented, low-level language designed for predictable execution and maintainable systems programming. It combines familiar C-style control flow with a structured, class-based model. Memory is managed through a hierarchical ownership tree with deterministic destruction; there is no garbage collector.

What is documented here

  • Installation — How to install the Cloth compiler, or build it from source.
  • Getting Started — A short tutorial that walks through writing and running a Cloth program.
  • Reference — Detailed documentation of the language, organized into:
  • Types — Built-in types: integers, floating-point, booleans, strings, arrays, tuples, nullables, generics, and the special any and void types.
  • Language — Syntax and semantics: modules, classes, interfaces, functions, control flow, operators, the memory model, error handling, and annotations.

Conventions

Code samples in this documentation use the cloth language tag and reflect the syntax accepted by the current compiler. Source files use the extension .co and begin with a module declaration. Cloth is case-sensitive. Statements end with a semicolon.