Some keywords listed here are part of the language design but are not yet implemented in the current compiler — notably auto, tuple, lamb, and autoremove. See Compiler Status for the full list.
C△ inherits all standard C11 keywords and adds new ones for its type system, memory management, module system, and assembly integration. Keywords marked as deprecated will raise a SyntaxError at compile time — remove or replace them before your program will compile.
Type Keywords
Use these keywords to declare the type of a variable, parameter, or return value. C△ extends the standard C11 numeric types with first-class string, dynamic-type auto, and two collection types.
| Keyword | Description |
|---|
int | Signed integer |
char | Single character / byte |
float | Single-precision float |
double | Double-precision float |
void | No type / no return |
short | Short integer |
long | Long integer |
signed | Explicitly signed integer |
unsigned | Unsigned integer |
string | First-class string type |
auto | Dynamic / inferred type |
dynam | Dynamic array |
tuple | Dynamic heterogeneous list |
Structure Keywords
Use these keywords to define named types, namespaces, and type aliases.
| Keyword | Description |
|---|
struct | Plain struct (no inheritance) |
space | Library namespace declaration |
typed | Typed struct (with inheritance) |
typedef | C11 type alias |
union | C11 union |
enum | C11 enumeration |
typed structs support inheritance, while plain struct does not. Use typed when you need a struct to extend another struct’s fields.
Control Flow
These keywords control the execution path through your program. They behave identically to their C11 counterparts.
| Keyword | Description |
|---|
if / else | Conditional branching |
while | While loop |
for | For loop |
do | Do-while loop |
switch / case / default | Switch statement |
break | Break out of loop/switch |
continue | Skip to next iteration |
return | Return from function |
goto | C11 goto |
Variables declared in the init clause of a for loop are scoped to that loop body — they are not visible in the enclosing function scope.
Memory Keywords
C△ gives you fine-grained control over heap memory. You can manage memory manually with allocate and free, or opt into automatic last-use deallocation with autoremove.
| Keyword | Description |
|---|
allocate | Heap allocation (allocate type name [size]) |
free | Manual heap deallocation |
autoremove | Heap alloc freed at last use (simulation pass) |
Use autoremove to let the compiler’s simulation pass insert free calls automatically at the last point each pointer is used. This eliminates a whole class of memory leaks without requiring a garbage collector.
Module / Import Keywords
These keywords let you bring external library symbols into scope, expose namespaces globally, and even replace built-in syntax with library-provided alternatives.
| Keyword | Description |
|---|
using | Import a symbol from a library |
expose | Globalize a library or namespace |
@ | Explicit namespace access operator |
overwrite | Overwrite base syntax with library syntax |
// Import the 'println' symbol from the 'io' library
using io.println;
// Access a symbol explicitly with the @ operator
io@println("hello");
// Expose an entire namespace into the current scope
expose io;
Other Keywords
These keywords cover inline assembly, lambdas, struct lifecycle functions, and standard C11 qualifiers.
| Keyword | Description |
|---|
asm | Inline assembly block |
lamb | Named lambda |
self | Optional struct self-reference |
init | Struct constructor lifecycle function |
end | Struct destructor lifecycle function |
sizeof | C11 size operator |
const | Constant qualifier |
volatile | Volatile qualifier |
static | Static storage |
extern | External linkage |
inline | Inline hint |
register | Register hint |
Use init and end to define constructor and destructor lifecycle functions on your structs. The compiler calls init when the struct is created and end when it goes out of scope or is freed.
Deprecated Keywords
The following C11 keywords are not supported in C△ and will immediately raise a SyntaxError when the compiler encounters them. Remove or replace any of these keywords before compiling.
| Keyword | Reason |
|---|
auto(C11 meaning) | Repurposed as dynamic type inference in C△ |
restrict | Removed |
_Bool | Removed |
_Complex | Removed |
_Imaginary | Removed |