Skip to main content
C△ is under active development. Some documented features — auto type inference, tuple, struct constructors / methods / typed struct inheritance, lamb lambdas, autoremove, Robbery, and printfs — are not yet implemented in the current compiler. See Compiler Status for the full list.
C△ (pronounced “C Triangle”) is a systems programming language born out of frustration with two extremes: C’s featurelessness and C++‘s overwhelming complexity. C△ extends C11 with a curated set of modern features — first-class strings, dynamic arrays, memory ownership, inline assembly, and a growing standard library — while staying close to C’s spirit and remaining fully C11-compatible. The Hypotenuse Compiler compiles .ctri source files to C and assembly, then links them into native binaries using GCC and NASM. The result is a language you can learn quickly, reason about clearly, and deploy anywhere C runs.

Three Design Principles

Every decision in C△ follows three guiding principles.

Explicit over Implicit

Nothing happens in your program without you knowing about it. Memory allocation, ownership transfers, and type conversions are always visible in the source.

Simple over Clever

The syntax stays close to C’s spirit. If a feature would require you to understand a deep layer of compiler magic to use it correctly, it does not belong in C△.

Extensible over Fixed

The language can grow through libraries. You can package reusable C△ code as .plib files and distribute them — the standard library (plstd) itself is built this way.

Key Features

The cards below describe the C△ language as designed. Several features are still being wired up in the Hypotenuse Compiler — see Compiler Status for the authoritative list of what’s implemented today.
C△ adds the following capabilities on top of the full C11 feature set.

First-Class Strings

The string type manages heap-allocated character sequences with automatic duplication, reassignment, and concatenation. No more manual malloc/strcpy chains.

Dynamic Arrays

The dynam type gives you a growable array literal with a syntax you already know. Pair it with len() from plstd to iterate safely.

Memory Ownership

allocate and free handle raw heap memory. autoremove frees a variable when it falls out of scope. The robbery mechanism transfers ownership explicitly between scopes without hidden copies.

Inline Assembly

Write asm blocks directly in your source file. The compiler routes them through NASM and links the resulting object files into the final binary alongside your C△ code.

Typed Struct Inheritance

Use typed struct to define a struct that inherits fields and behaviour from a parent struct — a lightweight alternative to C++‘s inheritance model.

Named Lambdas

Declare inline functions with lamb. Named lambdas are first-class values you can pass, store, and call without the boilerplate of a full function declaration.

Namespace System

Import individual symbols or whole libraries with using. Selective imports (e.g. using printd from <plstd>) keep your namespace clean and your intent explicit.

plstd Standard Library

The plstd library ships with the compiler and provides type-aware printing (printd), formatted output (printfs), string operations, file I/O, and more — all built from .plib modules.

Supported Platforms

The Hypotenuse Compiler currently targets the following platforms. All are under active development.
ArchitecturePlatformOutput FormatBackendNotes
x86_64LinuxELF64GCC + NASMFully automatic
ARM64macOSELF64ContainersUses Apple’s Containers software to virtualize Linux output
x86_64WindowsPE/COFFMSVC (manual)Only emits .cfiles, doesn’t support asm or msvc
The standard library (plstd) uses conditional compilation to handle the differences between the Linux syscall ABI (mov rax, N; syscall) and the macOS syscall ABI (mov x16, N; svc #0x80), so the same C△ source code works on both targets without modification.
Ready to write your first C△ program? Head over to the Quickstart guide and have a running binary in under five minutes.