Cloth does not hide behavior behind runtimes or implicit systems. Execution is predictable, and the cost of every operation is visible.
Memory ownership is defined and enforced. Allocation, lifetime, and destruction are controlled directly by the developer.
Compiled with low-level control in mind, Cloth delivers consistent performance without sacrificing readability or structure.
Built for infrastructure, backend services, and performance-critical environments where correctness and control matter most.
Most modern languages trade control for convenience. Hidden runtimes, implicit behavior, and layered abstractions make systems harder to reason about.
Cloth takes a different approach. Behavior is explicit, memory is owned, and execution is predictable. There are no hidden costs or invisible systems working against you.
It is designed for developers who need to understand their systems completely — not just use them.
Cloth is not trying to be everything. It is built to be correct, predictable, and under your control.
Clear file structure. Explicit declarations. Predictable execution.
module cloth.examples;
import cloth.io::{ println };
public class Main() {
#Trait Prototype
public func main() :> void maybe NullPtrException;
public Main {
main() => (error) {
println("An error occurred: " + error.message);
};
}
#Trait Implementation
public func main() :> void maybe NullPtrException {
const string[] greetings = [
"Hello", "Hola", "Bonjour",
"Ciao", "こんにちは", "안녕하세요",
"Cześć", "Olá", "Здравствуйте",
"Chào bạn", "您好", "Hallo",
"Hej", "Ahoj", "سلام", "สวัสดี"
];
for (i32 i = 0; i < greetings::LENGTH; i++) {
string? greeting = greetings[i] maybe null;
println(greeting ?? continue);
}
}
}A Cloth source file is organized with a module declaration, imports, and a single top-level type. The layout is rigid by design.
Imports are precise. Bring in only the symbols you need instead of pulling an entire namespace into scope.
Values and return paths are declared directly in the source, making intent and behavior obvious at a glance.
A public Main class provides a clear and predictable program entry model for tooling, builds, and execution.