Skip to content

Agnostic

Agnostic is a statically typed, imperative language. The reference implementation is a compiler written in C++20 with two native code generation backends: one built on the LLVM C++ API (llvm) and one built on libgccjit (gcc).

The language has functions, function values and closures that capture variables by reference, structs with methods but no inheritance and no vtables, and comptime blocks that select code at compile time based on target OS, target architecture, or memory mode. Generics and pattern matching do not exist. See Types for what the type system covers instead.

Executables produced by the llvm backend do not link against libc. They call the Linux kernel through raw syscalls and pick a memory management strategy at build time: automatic reference counting (arc, the default), manual allocation with no automatic freeing (manual), or per-function region allocation (orc). Details are in Toolchain.