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..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.
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.| Architecture | Platform | Output Format | Backend | Notes |
|---|---|---|---|---|
| x86_64 | Linux | ELF64 | GCC + NASM | Fully automatic |
| ARM64 | macOS | ELF64 | Containers | Uses Apple’s Containers software to virtualize Linux output |
| x86_64 | Windows | PE/COFF | MSVC (manual) | Only emits .cfiles, doesn’t support asm or msvc |
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.
